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. Visual Basic
  4. Send Control key signal

Send Control key signal

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 3 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.
  • R Offline
    R Offline
    Rylogy
    wrote on last edited by
    #1

    Hey how can I send the key signal for the control key I've tried but I can't get it to work. I'm using the SendKeys.Send("{}")

    D D 2 Replies Last reply
    0
    • R Rylogy

      Hey how can I send the key signal for the control key I've tried but I can't get it to work. I'm using the SendKeys.Send("{}")

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

      SendKeys won't send just a modifier key. You have to have an alphanumeric key between those braces also. The only way to send just the Ctrl key is to use SendMessage API call and post the WM_KEYDOWN and WM_KEYUP messages to the appropriate window. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      R 1 Reply Last reply
      0
      • D Dave Kreskowiak

        SendKeys won't send just a modifier key. You have to have an alphanumeric key between those braces also. The only way to send just the Ctrl key is to use SendMessage API call and post the WM_KEYDOWN and WM_KEYUP messages to the appropriate window. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        R Offline
        R Offline
        Rylogy
        wrote on last edited by
        #3

        I still don't get it :( do you have an example code I can see?

        1 Reply Last reply
        0
        • R Rylogy

          Hey how can I send the key signal for the control key I've tried but I can't get it to work. I'm using the SendKeys.Send("{}")

          D Offline
          D Offline
          Dennis C Dietrich
          wrote on last edited by
          #4

          Rylogy wrote: Hey how can I send the key signal for the control key [...] I'm using the SendKeys.Send("{}") Have you tried SendKeys.Send("^") (see SendKeys Class[^])? Best regards Dennis

          R 1 Reply Last reply
          0
          • D Dennis C Dietrich

            Rylogy wrote: Hey how can I send the key signal for the control key [...] I'm using the SendKeys.Send("{}") Have you tried SendKeys.Send("^") (see SendKeys Class[^])? Best regards Dennis

            R Offline
            R Offline
            Rylogy
            wrote on last edited by
            #5

            Dennis C. Dietrich wrote: Have you tried SendKeys.Send("^") (see SendKeys Class[^])? Best regards Dennis nop

            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