   print screen
  Does anybody know what the "Print Screen" key actually does when a user presses it?I'm writing a windows program that takes a screen shot whenever the user presses one of the GUI buttons (not just the keyboard button).In order to accomplish this my handler needs to know how to intercept a prt scr keydown message, but for the life of me I can't figure out how to do this. Neither google nor MSDN have been very helpful so far...And also, once I intercept the message from the keyboard, how does the print screen command actually work? In other words, how do I programatically instruct windows to take the screen shot as save it to the system clipboard?And beyond that, how do I get it from being a clipboard buffer to, say, a jpg file?   
Quote:Original post by plywoodI'm writing a windows program that takes a screen shot whenever the user presses one of the GUI buttons (not just the keyboard button).... Why? They already have a perfectly functional way to take screen shots: the print-screen button. :sQuote:In order to accomplish this my handler needs to know how to intercept a prt scr keydown message, but for the life of me I can't figure out how to do this. Neither google nor MSDN have been very helpful so far...I'm pretty sure you want to look for a specific message for the print-screen request, rather than a virtual-key-code for the print-screen key. But I don't know what it's called either :(Quote:In other words, how do I programatically instruct windows to take the screen shot as save it to the system clipboard?Through some sort of Windows API call, I would imagine.Quote:And beyond that, how do I get it from being a clipboard buffer to, say, a jpg file?Windows handles that when the user pastes the clipboard to somewhere appropriate.No, seriously: what are you REALLY trying to do, and WHY?