?? test.frm
字號:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5745
ClientLeft = 1740
ClientTop = 1530
ClientWidth = 6420
LinkTopic = "Form1"
ScaleHeight = 5745
ScaleWidth = 6420
Begin VB.CommandButton Command2
Caption = "Command2"
Height = 615
Left = 3000
TabIndex = 2
Top = 3240
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 735
Left = 3120
TabIndex = 1
Top = 1920
Width = 2415
End
Begin ComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 495
Left = 0
TabIndex = 0
Top = 5250
Width = 6420
_ExtentX = 11324
_ExtentY = 873
SimpleText = ""
_Version = 327680
BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7}
NumPanels = 1
BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7}
TextSave = ""
Object.Tag = ""
EndProperty
EndProperty
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 Declare Function SetCapture Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Sub Command1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = "This is Command1"
End Sub
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim MouseOver As Boolean
'判斷當前鼠標位置是否在Command2上
MouseOver = (0 <= X) And (X <= Command2.Width) And (0 <= Y) And (Y <= Command2.Height)
If MouseOver Then
' 假如鼠標在Command2上, 則利用SetCapture將每一個鼠標事件都傳遞給Command2
' 并在StatusBar1.Panels(1)上顯示幫助信息
StatusBar1.Panels(1).Text = "This is Command2"
SetCapture Command2.hWnd
Else
' 假如鼠標不在Command2上, 則利用SetCapture釋放鼠標捕捉
' 并清除在StatusBar1.Panels(1)上的幫助信息
StatusBar1.Panels(1).Text = ""
ReleaseCapture
End If
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
StatusBar1.Panels(1).Text = ""
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -