📄 practice2-5.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "测试鼠标事件"
ClientHeight = 3195
ClientLeft = 7680
ClientTop = 6225
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text1
Height = 615
Left = 840
TabIndex = 1
Top = 840
Width = 3135
End
Begin VB.CommandButton Command1
Caption = "改变窗体颜色"
Height = 735
Left = 1320
TabIndex = 0
Top = 2040
Width = 2055
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.BackColor = vbRed
End Sub
Private Sub Command1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Form1.BackColor = vbGreen
End Sub
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = "在窗体上按下鼠标"
End Sub
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Text1.Text = "在窗体上抬起鼠标"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -