Private Sub Form1_MouseMove(ByValeventSender As System.Object,ByVal eventArgs AsSystem.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove@H_404_2@
Dim Button As Short = eventArgs.Button\ &H100000@H_404_2@
Dim Shift As Short =System.Windows.Forms.Control.ModifierKeys \ &H10000@H_404_2@
Dim X As Single = eventArgs.X@H_404_2@
Dim Y As Single = eventArgs.Y@H_404_2@
'@H_404_2@当鼠标移动时,相应的状态栏也应该改变@H_404_2@
'@H_404_2@判断工具栏的按钮是否按下,如果是,则显示鼠标位置@H_404_2@
If Toolbar1.Buttons(1).Value =MSComctlLib.ValueConstants.tbrPressed Then@H_404_2@
StatusBar1.Panels(1).Text ="@H_404_2@当前鼠标位置:@H_404_2@" & X & ","& Y@H_404_2@
'@H_404_2@否则,显示空@H_404_2@
Else@H_404_2@
StatusBar1.Panels(1).Text =""@H_404_2@
End If@H_404_2@
End Sub@H_404_2@
Private Sub Toolbar1_ButtonClick(ByValeventSender As System.Object,ByVal eventArgs AsAxMSComctlLib.IToolbarEvents_ButtonClickEvent) Handles Toolbar1.ButtonClick@H_404_2@
'@H_404_2@当单击工具栏时,立刻改变状态栏的信息;要不会出现单击按钮后不发生任何改变@H_404_2@
Select Case eventArgs.Button.Key@H_404_2@
Case "ShowMousePos"@H_404_2@
If Toolbar1.Buttons(1).Value =MSComctlLib.ValueConstants.tbrPressed Then@H_404_2@
StatusBar1.Panels(1).Text= "@H_404_2@当前鼠标位置:@H_404_2@0,0"@H_404_2@
Else@H_404_2@
StatusBar1.Panels(1).Text= ""@H_404_2@
End If@H_404_2@
Case Else@H_404_2@
End Select@H_404_2@
End Sub@H_404_2@
@H_404_2@@H_404_2@
@H_404_2@