Link to home
Start Free TrialLog in
Avatar of snayaks
snayaks

asked on

Print Screen

I want Current window programmes screen to be printed, if user cleicks/presses a button. My idea was to presss ALT+Print Screnn (which will save the current window into clip board) and then use printer.paintpicture method to print it.

Can we save the current window in clip board using any API of DLL functions ? (i.e without pressing ALT+print Screen)
ASKER CERTIFIED SOLUTION
Avatar of Erick37
Erick37
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
snayaks:
     I think you will find the answer you are looking for in one of these two articles:

http://support.microsoft.com/support/kb/articles/Q161/2/99.ASP?LNG=ENG&SA=ALLKB&FR=0 

http://support.microsoft.com/support/kb/articles/Q140/8/85.asp?LNG=ENG&SA=ALLKB&FR=0 

     Hope this helps.

John
Erik37:
     It seems as though you beat me by a few minutes while I was searching for the same links as you.
they're not all the same :O)

and for some extra sourcecode for exact this question

http://www.thescarms.com/vbasic/Capture.htm

"Capture the entire contents of a form.
Capture the client area of a form.
Capture the entire screen.
Capture the active window.
Capture any portion of any window.
Create a Picture object from a bitmap and a palette.
Print a Picture object as large as possible on the page. "

that should work

HTH:O)Bruintje
Avatar of snayaks
snayaks

ASKER

Hi Erick37

I tried with

http://support.microsoft.com/support/kb/articles/Q161/2/99.ASP 

example and  it worked fine

Thanks a lot

snayaks




Avatar of snayaks

ASKER

-
You're welcome.
Glad to help.
:-)