vnarod Posted April 4, 2003 Posted April 4, 2003 Is there a way to simulate a click of toolbar button from code? I do not mean visually, I just need to execute code in that event. Quote
*Experts* Volte Posted April 4, 2003 *Experts* Posted April 4, 2003 Just call the handler sub from code. You need to pass an EventArgs object though. Like this: Private Sub ButtonClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim eArgs As New ToolBarButtonClickEventArgs(ToolBarButton2) ToolBar1_ButtonClick(ToolBar1, eArgs) End Sub Quote
vnarod Posted April 7, 2003 Author Posted April 7, 2003 The problem is that I am trying to get at Toolbar from CrystalViewer. Where is no Toolbar property. I can get to it only like this: for each c in crv.controls if TypeOf c is ToolBar then tb=c exit for end if next No, how do I call ButtonClick event for tb? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.