RE: Capture Screen Image via Code w/out User Interaction



From the clipboard, it'd be saving the image to a file. Off the top of the
head, mostly likely using Paint along the lines of Set objPaint =
CreateObject("Paint.Application"). Of course, I've never tried automating
paint and have no idea if its possible.

"BeWyched" wrote:

Hi.

You can use a Windows API call to achieve this:

In the form's declaration section (i.e. at the top) enter:

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan
As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Then, in your error capture coding put:

keybd_event VK_SNAPSHOT, 1, 0, 0

This will copy a 'Print Screen' image to the clipboard. What will you to do
with that? Let me know and I'll try and help.

Cheers.

BW





"dch3" wrote:

I'm entertaining the idea of enhancing my error logging by doing a screen
capture at the time that the error handler kicks in.

Anyone have experience with capturing the screen image and then saving it
via code?
.



Relevant Pages

  • RE: Capture Screen Image via Code w/out User Interaction
    ... Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ... in your error capture coding put: ... capture at the time that the error handler kicks in. ... Anyone have experience with capturing the screen image and then saving it ...
    (microsoft.public.access.modulesdaovba)
  • RE: Capture Screen Image via Code w/out User Interaction
    ... Set wdApp = CreateObject ... Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ... in your error capture coding put: ... capture at the time that the error handler kicks in. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Question about how gambling software works
    ... how do you capture the data coming off the screen image to ... I'm confused as to how to capture that info. ... around to implementing the betting intelligence. ... what cards you were dealt and what cards were ...
    (comp.programming)
  • Re: StretchBlt issue
    ... I am trying to capture the screen image and ... I tried using StretchBlt. ... CBitmap hbm; ...
    (microsoft.public.vc.language)
  • Re: Capturing WindowsXP login with Print screen
    ... I have capture a screen image many times before I ... still can't capture the login by doing what you suggested. ... > screen key, unlock station, paste into any program that accepts graphics. ...
    (microsoft.public.windowsxp.general)

Loading