leontager Posted January 18, 2004 Posted January 18, 2004 how do i take a screen shot of the whole screen. if i take a screen shot using sendkeys then i for some reason i only get a picture of my program. Also how can i save it afterwards? Quote
hog Posted January 18, 2004 Posted January 18, 2004 I might not be understanding you, but Alt-PrintScreen? Quote My website
samsmithnz Posted January 18, 2004 Posted January 18, 2004 Alt-Prt Scr is for the active window. What you want is jsut the print screen button. Then its in the clipboard, so you can extract it and save it from there. Quote Thanks Sam http://www.samsmith.co.nz
Shazbots Posted January 18, 2004 Posted January 18, 2004 a quick search on any source code site would return many results PSC one Quote
leontager Posted January 19, 2004 Author Posted January 19, 2004 i did type just print screen and it gave me active window only. on the code Shazbots gave me it says SendKeys.SendWait("{PRTSC 2}"). but i just figured out that active window should work for me. Thank you for your help Quote
Leaders dynamic_sysop Posted January 19, 2004 Leaders Posted January 19, 2004 try the keyboard event api :) Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Integer, ByVal dwExtraInfo As Integer) '/// then in a sub / click event... Dim VK_SNAPSHOT As Integer = &H2C keybd_event(VK_SNAPSHOT, 0, 0, 0) Quote
sde Posted January 20, 2004 Posted January 20, 2004 here is code in c# send it 'true' if you only want the active window .. false if you want everything. private Image GetScreenShot(bool activeWindowOnly) { if(activeWindowOnly) { SendKeys.SendWait("%{PRTSC}"); } else { SendKeys.SendWait("{PRTSC 2}"); } return (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap); } Quote codenewbie
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.