G
Guest
Hi guys!
I've an event that belongs to a ToolBar:
Private Sub ToolBar1_ButtonClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
...
End Sub
I'd like to know how can I raise that event manually, throught a TextBox
KeyPress event:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Convert.ToChar(Keys.Return) Then
ToolBar1_ButtonClick(ToolBar1,
System.Windows.Forms.ToolBarButtonClickEventArgs.Empty)
End If
End Sub
I tried that code, but it didnt work.
thanks
I've an event that belongs to a ToolBar:
Private Sub ToolBar1_ButtonClick(ByVal sender As Object, ByVal e As
System.Windows.Forms.ToolBarButtonClickEventArgs) Handles ToolBar1.ButtonClick
...
End Sub
I'd like to know how can I raise that event manually, throught a TextBox
KeyPress event:
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
If e.KeyChar = Convert.ToChar(Keys.Return) Then
ToolBar1_ButtonClick(ToolBar1,
System.Windows.Forms.ToolBarButtonClickEventArgs.Empty)
End If
End Sub
I tried that code, but it didnt work.
thanks