CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Click on a menu from code

    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


  2. #2
    Guest

    Re: Click on a menu from code

    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


  3. #3
    Guest

    Re: Click on a menu from code

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured