Raising a Toolbar Button Click event using code or API calls
Posted on 1998-08-25
I have an application where we are trying to localize all of the code to turn on and off buttons on a toolbar within the active form. We also would like to have a menu bar within the application, and have this remain in sync with the toolbar. This is pretty much no problem. Then to communicate what button has been clicked on, we have a toolbar object in each form that is using the WithEvents keyword to listen to the button bar and act accordingly, this also works great. The problem we are having is that when the user selects the same option from the menu bar we would like to have this action raise the appropriate toolbar event, the toolbar_click event. The only problem is
we have no idea how to do this. We have tried calling the toolbar_click sub passing in the appropriate button, but it did not work. I am wondering if anyone knows an API call to use that will raise events for a specified control.