📄 例3.8.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 1890
ClientLeft = 60
ClientTop = 450
ClientWidth = 5805
LinkTopic = "Form1"
ScaleHeight = 1890
ScaleWidth = 5805
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command3
Caption = "显示标签(&D)"
Height = 375
Left = 4200
TabIndex = 2
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "隐藏标签(&H)"
Height = 375
Left = 2520
TabIndex = 1
Top = 1200
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "改变文字颜色(&C)"
Height = 375
Left = 360
TabIndex = 0
Top = 1200
Width = 1695
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Caption = "计算机程序设计语言"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 3
Top = 360
Width = 3255
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()
Randomize
Label1.BackColor = QBColor(15) '背景色
Label1.ForeColor = QBColor(0) '文字颜色
Label1.FontSize = 18 '字体大小
End Sub
Private Sub Command1_Click() '“改变文字颜色”按钮
Clr = Int(15 * Rnd) '产生随机颜色码
Label1.ForeColor = QBColor(Clr)
End Sub
Private Sub Command2_Click() '“隐藏标签”按钮
Label1.Visible = False '隐藏标签
End Sub
Private Sub Command3_Click() '“显示标签”按钮
Label1.Visible = True '显示标签
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -