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. To get Paste event using keyboard event

To get Paste event using keyboard event

Scheduled Pinned Locked Moved Visual Basic
help
3 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.
  • P Offline
    P Offline
    percyvimal
    wrote on last edited by
    #1

    I want to simulate a CTRL + V combination using keybd_event keybd_event(17, 0, 0, 0) Ctrl Keydown keybd_event(Vk_V, 0, 0, 0) V keydown keybd_event(Vk_V, 0, KEYEVENTF_KEYUP, 0) V keydown keybd_event(17, 0,ExtKEYEVENTF_KEYUP, 0) Ctrl Down But it dont work Can anybody help me in this regard

    N D 2 Replies Last reply
    0
    • P percyvimal

      I want to simulate a CTRL + V combination using keybd_event keybd_event(17, 0, 0, 0) Ctrl Keydown keybd_event(Vk_V, 0, 0, 0) V keydown keybd_event(Vk_V, 0, KEYEVENTF_KEYUP, 0) V keydown keybd_event(17, 0,ExtKEYEVENTF_KEYUP, 0) Ctrl Down But it dont work Can anybody help me in this regard

      N Offline
      N Offline
      Nic Rowan
      wrote on last edited by
      #2

      The [Control key](http://Control key)[^] is 11 or VK_CONTROL not 17. Hope this helps. :) [edit] Sorry, I just realised 11 is 17 in Hex. It's Friday and my mind's in low gear. If 11 doesn't work try &H11 or just use VK_CONTROL[/edit] Nic "Sleepy" Rowan


      The trouble with apathy these days is nobody cares. Capital Punishment means never having to say "you again?" As easy as 3.141592653589793238462643383279502884197169


      1 Reply Last reply
      0
      • P percyvimal

        I want to simulate a CTRL + V combination using keybd_event keybd_event(17, 0, 0, 0) Ctrl Keydown keybd_event(Vk_V, 0, 0, 0) V keydown keybd_event(Vk_V, 0, KEYEVENTF_KEYUP, 0) V keydown keybd_event(17, 0,ExtKEYEVENTF_KEYUP, 0) Ctrl Down But it dont work Can anybody help me in this regard

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

        Are you sending the paste to a specific app? If so, why not use SendKeys "^V"? It will do the exact same thing... RageInTheMachine9532

        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