![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
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?
|
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 | |
|
Hobbyist Programmer
|
Quote:
__________________
Hoes telling me to calm down but I'm like fuck that shit!
|
|
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
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... ![]() |
|
|
|
|
|
#5 |
|
PFO Founder
![]() ![]() |
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?
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
I don't think the language matters as it's a straight WinAPI question.
|
|
|
|
|
|
#7 |
|
PFO Founder
![]() ![]() |
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
![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#8 | |
|
Programmer
Join Date: Feb 2005
Posts: 86
Rep Power: 0
![]() |
Quote:
|
|
|
|
|
|
|
#9 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,799
Rep Power: 5
![]() |
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.
Pasting with the win32api is easy though, you just use keybd_event. |
|
|
|
|
|
#10 |
|
Hobbyist Programmer
Join Date: Nov 2004
Location: 1691 miles East of L.A.
Posts: 159
Rep Power: 4
![]() |
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.
__________________
-- lostcauz Stepped in what?... Behind whose barn?... I didn't even know they had a cow! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|