Click to See Complete Forum and Search --> : VB.NET Toolbar
martialdc
Dec 17th, 2002, 10:26 PM
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?
Pirate
Dec 17th, 2002, 11:44 PM
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
that's all.
Edneeis
Dec 18th, 2002, 01:44 AM
You can also assign a text value to the tag property and use that.
Pirate
Dec 18th, 2002, 09:09 AM
didn't know that before, so thanx:D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.