Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Making Menu Selections through Program

Making Menu Selections through Program

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Abhishek Karnik
    wrote on last edited by
    #1

    Hey there, I have an application which lists the following menu options "File" " View" "Help" etc. And ofcourse within each of these is a further list of options. I want to write an application which will automatically nagivate through this menu ... As an example...suppose I want to go to View->Text Size -> Normal, I can do so through my application at the click of a button. Is anyone aware of the kind of messages I could send or provide an example of any such code you may have. Regards, Abhishek

    R D 2 Replies Last reply
    0
    • A Abhishek Karnik

      Hey there, I have an application which lists the following menu options "File" " View" "Help" etc. And ofcourse within each of these is a further list of options. I want to write an application which will automatically nagivate through this menu ... As an example...suppose I want to go to View->Text Size -> Normal, I can do so through my application at the click of a button. Is anyone aware of the kind of messages I could send or provide an example of any such code you may have. Regards, Abhishek

      R Offline
      R Offline
      Rob Tomson
      wrote on last edited by
      #2

      have you tried menuItem1.PerformClick() ? Rob -- There are 10 kinds of people. Those who understand binary and those who don't.

      A 1 Reply Last reply
      0
      • R Rob Tomson

        have you tried menuItem1.PerformClick() ? Rob -- There are 10 kinds of people. Those who understand binary and those who don't.

        A Offline
        A Offline
        Abhishek Karnik
        wrote on last edited by
        #3

        hey, thanks for the reply however I am trying to navigate through a different programs menu using my application.

        G 1 Reply Last reply
        0
        • A Abhishek Karnik

          hey, thanks for the reply however I am trying to navigate through a different programs menu using my application.

          G Offline
          G Offline
          g00fyman
          wrote on last edited by
          #4

          do you have the programs SDK ? that would be a big help regs g00fy

          A 1 Reply Last reply
          0
          • G g00fyman

            do you have the programs SDK ? that would be a big help regs g00fy

            A Offline
            A Offline
            Abhishek Karnik
            wrote on last edited by
            #5

            I dont have the SDK but I could use Microsoft Depends to get a idea of the function being called.

            1 Reply Last reply
            0
            • A Abhishek Karnik

              Hey there, I have an application which lists the following menu options "File" " View" "Help" etc. And ofcourse within each of these is a further list of options. I want to write an application which will automatically nagivate through this menu ... As an example...suppose I want to go to View->Text Size -> Normal, I can do so through my application at the click of a button. Is anyone aware of the kind of messages I could send or provide an example of any such code you may have. Regards, Abhishek

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              Your looking for SendKeys[^]. Which, BTW, is a problematic way to control another application. Since the focus can shift from one window to another without any warning, your keystrokes could end up going to the wrong application. Also, I hope your VB app that your controlling has keyboard shortcuts define for all the menu choices... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups