Loading ...
Sorry, an error occurred while loading the content.

Re: is "Screen scraping" possible?

Expand Messages
  • Richard Russell
    ... It s easy enough to automate it. Just use the keybd_event Windows API function to send the VK_SNAPSHOT key code. Microsoft themselves suggest this
    Message 1 of 6 , Mar 1 1:23 AM
    • 0 Attachment
      --- In libertybasic@yahoogroups.com, "torpidai" <torpidai@...> wrote:
      > The problem with print screen is the lack of automation

      It's easy enough to automate it. Just use the 'keybd_event' Windows
      API function to send the VK_SNAPSHOT key code. Microsoft themselves
      suggest this method ("An application can simulate a press of the
      PRINTSCRN key in order to obtain a screen snapshot and save it to the
      clipboard"):

      http://msdn2.microsoft.com/en-us/ms646304.aspx

      An alternative is to do it using standard Windows GDI calls. The
      functions you would need to use are:

      'GetDesktopWindow' to get a window handle for the desktop.
      'GetDC' to get a device context for the desktop.
      'BitBlt' to copy a region of the desktop to your own bitmap.

      Richard.
    Your message has been successfully submitted and would be delivered to recipients shortly.