Board index » cppbuilder » Hot to capture the active window?

Hot to capture the active window?

How can I capture a picture of the active window?

--
Marc Ouellette
Sault Custom Programming
http://scp.on.ca

 

Re:Hot to capture the active window?


try this

    keybd_event(0x2c,1,0,0);    //simulate print-key down
    keybd_event(0x2c,0,2,0);    //simulate print-key up
and die complete screen is in the clipboard

    keybd_event(0x2c,0,0,0);    //simulate print-key down
    keybd_event(0x2c,0,2,0);    //simulate print-key down
and the active window is in the clipboard
under nt u must also simulate alt-key(0x12) to capture the active window

any questions : tazdevi...@iname.com

Sault Custom Programming schrieb:

Quote
> How can I capture a picture of the active window?

> --
> Marc Ouellette
> Sault Custom Programming
> http://scp.on.ca

Re:Hot to capture the active window?


Thanks but I am trying to do this with api calls. If I can't I will try to
use this method.

Thanks,
Marc

Quote
tazdevi...@iname.com wrote in message <36FA8474.3EB27...@iname.com>...
>try this

>    keybd_event(0x2c,1,0,0);    //simulate print-key down
>    keybd_event(0x2c,0,2,0);    //simulate print-key up
>and die complete screen is in the clipboard

>    keybd_event(0x2c,0,0,0);    //simulate print-key down
>    keybd_event(0x2c,0,2,0);    //simulate print-key down
>and the active window is in the clipboard
>under nt u must also simulate alt-key(0x12) to capture the active window

>any questions : tazdevi...@iname.com

Re:Hot to capture the active window?


This is a API-Call look here:
-----------------------------------------------------------------------------------

keybd_event(ByVal bVk, ByVal bScan, ByVal dwFlags, ByVal dwExtraInfo);
-----------------------------------------------------------------------------------

cu
tazdevi...@iname.com

Sault Custom Programming schrieb:

Quote
> Thanks but I am trying to do this with api calls. If I can't I will try to
> use this method.

> Thanks,
> Marc

> tazdevi...@iname.com wrote in message <36FA8474.3EB27...@iname.com>...
> >try this

> >    keybd_event(0x2c,1,0,0);    //simulate print-key down
> >    keybd_event(0x2c,0,2,0);    //simulate print-key up
> >and die complete screen is in the clipboard

> >    keybd_event(0x2c,0,0,0);    //simulate print-key down
> >    keybd_event(0x2c,0,2,0);    //simulate print-key down
> >and the active window is in the clipboard
> >under nt u must also simulate alt-key(0x12) to capture the active window

> >any questions : tazdevi...@iname.com

Re:Hot to capture the active window?


What I should have said is I am not trying to find a quick way around the
problem. I I am sure there is an api call to do this withought having to
simulate keyboard keys presses.

Marc

Quote
Ben Walerie wrote in message <36FA9B7C.47A54...@iname.com>...
>This is a API-Call look here:
>---------------------------------------------------------------------------
--------

>keybd_event(ByVal bVk, ByVal bScan, ByVal dwFlags, ByVal dwExtraInfo);
>---------------------------------------------------------------------------
--------

>cu

Re:Hot to capture the active window?


I figured out what api to call Thanks all.

Marc

Other Threads