How Toolbar works in VB.NET? I have add a Toolbar1 in a Form and I add 3 buttons.
This code work:
Select Case e.Buttons.Text
But how about if the button has no Text? Is there a possible way to solve this?
Printable View
How Toolbar works in VB.NET? I have add a Toolbar1 in a Form and I add 3 buttons.
This code work:
Select Case e.Buttons.Text
But how about if the button has no Text? Is there a possible way to solve this?
that's all.VB Code:
Private Sub ToolBar1_ButtonClick(ByVal sender As _ System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick Select Case ToolBar1.Buttons.IndexOf(e.Button) Case 0 MyWeb.GoBack() ' First button Case 1 MyWeb.GoForward() 'Second button Case 2 End Select End Sub
You can also assign a text value to the tag property and use that.
didn't know that before, so thanx:D