B
Brian Mitchell
How do you fire a toolbar ButtonClick event manually (for a specified
button)?
I have a toolbar with 4 buttons on it and I want to fire one of the button
events when the user clicks a different button on the form.
The event for the toolbar looks like this...
Private Sub tbUsers_ButtonClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
tbUsers.ButtonClick
Select Case e.Button.Text
Case "WhateverTheText"
....
....
....
End Select
End Sub
When I try to fire the event manually and pass a value for e.button.text, I
get an error "Value 'Boolean' cannot be converted to
ToolBarButtonClickEventArgs"
ie..
Public Sub Button
tbUsers_ButtonClick(Me, e.Button.Text="WhateverTheText")
End Sub
Is there some other special way I have to specify what button event I want
fired?
Thanks!!
button)?
I have a toolbar with 4 buttons on it and I want to fire one of the button
events when the user clicks a different button on the form.
The event for the toolbar looks like this...
Private Sub tbUsers_ButtonClick(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles
tbUsers.ButtonClick
Select Case e.Button.Text
Case "WhateverTheText"
....
....
....
End Select
End Sub
When I try to fire the event manually and pass a value for e.button.text, I
get an error "Value 'Boolean' cannot be converted to
ToolBarButtonClickEventArgs"
ie..
Public Sub Button
tbUsers_ButtonClick(Me, e.Button.Text="WhateverTheText")
End Sub
Is there some other special way I have to specify what button event I want
fired?
Thanks!!