'状态栏添加按钮
<CommandMethod("AddButton")> _
Public Sub AddButton()
Dim Button As Pane = New Pane
Button.Enabled = True
Button.Text = "添加按钮实例"
Button.ToolTipText = "添加按钮实例 ToolTipsText"
Button.Visible = True
Button.Style = PaneStyles.Normal
AddHandler Button.MouseDown, AddressOf StatusBarButton1_MouseDown
Application.StatusBar.Panes.Add(Button)
End Sub
Sub StatusBarButton1_MouseDown(ByVal sender As Object, ByVal e As StatusBarMouseDownEventArgs)
Dim Button As Pane = sender
MsgBox("你按下了该按钮,你可在此添加你要执行的代码!")
End Sub
<CommandMethod("AddButton")> _
Public Sub AddButton()
Dim Button As Pane = New Pane
Button.Enabled = True
Button.Text = "添加按钮实例"
Button.ToolTipText = "添加按钮实例 ToolTipsText"
Button.Visible = True
Button.Style = PaneStyles.Normal
AddHandler Button.MouseDown, AddressOf StatusBarButton1_MouseDown
Application.StatusBar.Panes.Add(Button)
End Sub
Sub StatusBarButton1_MouseDown(ByVal sender As Object, ByVal e As StatusBarMouseDownEventArgs)
Dim Button As Pane = sender
MsgBox("你按下了该按钮,你可在此添加你要执行的代码!")
End Sub
|
暂时没有评论
发表评论 - 不要忘了输入验证码哦! |