CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 1999
    Location
    RUSSIA, Tula
    Posts
    1

    Emulating PrintScreen key

    I wont save image of screen by using Clipboard.
    How can I emulate PrintScreen-key pressing ? (keybd_event(VK_SNAPSHOT,0,0,0) not fit. It save in Clipboard only current Form.)
    Or there are another way to save Screen image?


  2. #2
    Guest

    Re: Emulating PrintScreen key

    Use the GetDesktopWindow API to get the hWnd of the screen.
    Use the GetDC API to get the hDC of the screen.
    Use the BitBlt API with SRCCOPY to copy the screen to a PictureBox.
    Use the ReleaseDC API to free memory allocated to the GetDC API you used earlier.
    Then copy the PictureBox's contents to the Clipboard using Clipboard.SetData.


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

Featured