在Form_MouseMove事件中加入:
If X < Label1.Left + Label1.Width And X > Label1.Left And Y < Label1.Height + Label1.Top And Y > Label1.Top Then
Else
Label1.ForeColor = vbBlack
End If
在Label1_MouseMove事件中加入:
Label1.ForeColor = vbBlue
窗体的声明部分:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
窗体的声明部分:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long