Click to See Complete Forum and Search --> : Click on a menu from code


December 16th, 1999, 03:50 PM
Hi, can I click on a menu item from code? that is at run time I want to run a menu by code, not by clicking the menu by mouse.

Thank you for response

Alex

December 16th, 1999, 08:15 PM
Supposing the name of the menu item is mnuFileNew try this... First, put the code you want to run when the user click's the menu item behind it's Click event. Then to run that code...just call it like any other function. Example:

mnuFileNew_Click

December 17th, 1999, 09:04 AM
Thanks for the response, but do we have another way to call menu item like send a message or a run a menu command because I want call the menu item from anywhere in the application and I don't want set the click procedure as a public.

Thanks

Alex