Results 1 to 2 of 2

Thread: SendKeys & Printscreen [RESOLVED]

  1. #1

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77

    SendKeys & Printscreen [RESOLVED]

    hi,

    I'm trying to let my app automatically take a printscreen, but it doesn't seem to work.

    As far as I know, this should do the trick :
    VB Code:
    1. SendKeys "%{PRTSC}"

    but, as you might have guessed, it doesn't !
    SendKeys works fine with other 'keys' though !

    So, can somebody please tell me what is going wrong here, and how to solve it ?

    Thanx
    Last edited by illebille; Feb 12th, 2004 at 10:10 AM.

  2. #2

    Thread Starter
    Lively Member illebille's Avatar
    Join Date
    Sep 2003
    Posts
    77
    okay, problem is solved !

    I found that I can use an API-function instead :

    VB Code:
    1. Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
    2.  
    3. Private Sub XXX()
    4. keybd_event vbKeySnapshot, 1, 0, 0
    5. End Sub

    Still don't know why it doesn't work with SendKeys though...

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