例4.9.frm
来自「一本学习Visual Basic编程的好书」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "字体放大"
ClientHeight = 5955
ClientLeft = 60
ClientTop = 345
ClientWidth = 7740
LinkTopic = "Form1"
ScaleHeight = 5955
ScaleWidth = 7740
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Left = 3240
Top = 120
End
Begin VB.Label Label1
BackColor = &H00FFFFC0&
Caption = "Label1"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 0
TabIndex = 0
Top = 0
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Label1.Caption = "放大"
Label1.Width = Form1.Width
Label1.Height = Form1.Height
Timer1.Interval = 800
End Sub
Private Sub Timer1_Timer()
If Label1.FontSize < 140 Then
Label1.FontSize = Label1.FontSize * 1.2
Else
Label1.FontSize = 8
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?