📄 form2.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 255
Left = 2640
TabIndex = 2
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 255
Left = 840
TabIndex = 1
Top = 1800
Width = 975
End
Begin VB.Timer Timer1
Left = 840
Top = 720
End
Begin VB.Label Label1
Caption = "Label1"
Height = 495
Left = 2160
TabIndex = 0
Top = 840
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Timer1.Enabled = False Then
Timer1.Enabled = True
Command1.Enabled = False
End If
End Sub
Private Sub Command2_Click()
'Form1.Visible = False
End Sub
Private Sub Form_Load()
Timer1.Enabled = False
' If Timer1.Enabled = True Then
Timer1.Interval = 500
' End If
End Sub
Private Sub Timer1_Timer()
'With Label1
Select Case Label1.BackColor
Case vbBlue
Label1.BackColor = vbRed
Case vbRed
Label1.BackColor = vbGreen
Case Else
Label1.BackColor = vbBlue
End Select
If Label1.Left + Label1.Width < Width Then Label1.Left = Label1.Left + 50
'End With
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -