![]() |
Where does print screen keep the picture?
If I call print screen with the win32api, where can I find the picture file? Somewhere in the temp folder or the clipboard, how can I access the clipboard? If it's not stored as a picture is there a way I can do so instantly?
|
The Windows clipboard. Investigating that will fix you right up. Some applications will store data there in more than one format. An example would be an image in bitmap OR vector graphic format. Another would be text in Word or pure text format. I don't know if you are looking to deal with this programmatically, or just usefully. I presume programmatically, because of the mention of the Win API. From a strictly useful viewpoint, I can, for instance, use ALT-PrtScrn to copy the window with the focus to the clip board, hop into Paintshop Pro, or similar, and paste it as a new image. I hope this helps. If not, post back.
|
Quote:
|
Yep, I'm aware of the ability to paste back the previously printed screen, but as you assumed, I wish to do this programmatically. So is this clipboard a defined place? Or is it just unaccessable RAM?
EDIT: Beta_scripter, it says my computer doesn't have that file... :rolleyes: |
I know VB has a way to paste items that have been copied so Im sure that it is quite possible. What language are you using?
|
I don't think the language matters as it's a straight WinAPI question.
|
yeah I know but I thought i would ask and see if it was Vb cause if so then its really easy. If not then I dont know how to get it but Im pretty sure it is just a winapi tho so just look it up on google and im sure it will pop up right away. and there is always the MSDN liberary :)
|
Quote:
|
Well it's Python with the win32api import. But I don't know what to search for in the win32api docs to save from clipboard to image. :confused:
Pasting with the win32api is easy though, you just use keybd_event. |
Check out OpenClipboard, SetClipboardData and GetClipboardData along with the clipboard format CF_BITMAP.
For example, in masm invoke OpenClipboard,hWnd invoke SetClipboardData,CF_BITMAP,hBmp1 The clipboard now contains the pic hBmp1. |
| All times are GMT -5. The time now is 5:35 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC