detect if Ctrl R has been pressed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Killer42
    Recognized Expert Expert
    • Oct 2006
    • 8429

    #16
    I think that the only convenient way you'll accomplish that is by assigning a hot-key to your application's shortcut somewhere under the Start menu. However, I'll be very interested to see if I'm wrong.

    (For instance, if you create a shortcut to your program in the Startup folder and assign it hot-key Ctrl-Alt-R, then every time the user presses that key it should, in theory, jump to your application.)

    Comment

    • Mague
      New Member
      • May 2007
      • 137

      #17
      Originally posted by Killer42
      I think that the only convenient way you'll accomplish that is by assigning a hot-key to your application's shortcut somewhere under the Start menu. However, I'll be very interested to see if I'm wrong.

      (For instance, if you create a shortcut to your program in the Startup folder and assign it hot-key Ctrl-Alt-R, then every time the user presses that key it should, in theory, jump to your application.)
      Does this mean its not really possible to open the exe file then minizize it and then click ctrl r then the text in a tex tbox repeats until ctrl s is pressed

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #18
        Originally posted by Mague
        Does this mean its not really possible to open the exe file then minizize it and then click ctrl r then the text in a tex tbox repeats until ctrl s is pressed
        Well, I suppose that once the hot-key gets the attention of your program, you can do pretty much whatever you want.

        You might need to activate two hot-keys - one to start, one to stop. Perhaps they could be attached to different buttons, or windows, or something. You'd need to look into those links that were posted, to get the details of how.

        According to what I saw when I glanced at one of the links, you don't have to use the "assign hot-key to shortcut under Start menu" that I mentioned. It seems your program can set up a hot-key once it is running.

        Comment

        • HelloWorldHelloWorldHello
          Banned
          New Member
          • Jun 2007
          • 8

          #19
          That is Impossible. : - ( But Dont Worry Keep Trying

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #20
            What you want is something called a "global hook", if your program is running, regardless of if it has focus (say if it's minimized or your looking at another window) it will capture the keypress. My IM client does this allowing me to access it quickly with a simple keypress sequence. Offhand I am not able to remember how, but searching for "registerin g a global hook" might get you further.
            Also, you are using SendKeys to send the text to your program right?

            Comment

            • Atran
              Contributor
              • May 2007
              • 319

              #21
              Originally posted by Mague
              Does this mean its not really possible to open the exe file then minizize it and then click ctrl r then the text in a tex tbox repeats until ctrl s is pressed
              I know to use:

              Code:
                 Dim myShortcut As New System.Windows.Forms.Shortcut()
              But Do not know how to continue.
              And Check these two links:

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #22
                Originally posted by HelloWorldHello WorldHello
                That is Impossible.
                What is? Be more specific. We've discussed a few things in this thread. That's why it is usual to "echo" at least part of the message to which you're replying, so it's evident what you mean.

                Comment

                • Mague
                  New Member
                  • May 2007
                  • 137

                  #23
                  Hey


                  Thank you every1 for your help

                  Ill take a look ]at those websites and also i am using sendkeys.send because normal sendkeys doesnt work sendkeys.send is eqaclly the same and i no this because i know a few other languages such as SCAR which has the same prinicbles of programing

                  Ty every1
                  Mague

                  Comment

                  • Atran
                    Contributor
                    • May 2007
                    • 319

                    #24
                    I find a possible way but in C#, if you want the code go to .NET Forums, and start a new discussion about "Detect keys" or "Hotkey"...
                    There (in .net forums) I post you the code.

                    Comment

                    • Plater
                      Recognized Expert Expert
                      • Apr 2007
                      • 7872

                      #25


                      It's not in VB but in .NET, but it might help clue you in to how it's done

                      Comment

                      Working...