Hi! I want to print the screen (not with the printer) I want to print it like the 'print button' on the keyboard and get an image. Any idea? I did have no starting point :(
A:
Hi,
There are several articles I've found may help you.
Please check them.
Braveyard
2008-12-12 15:02:43
Ehm, your first link just points to the forum message that points to the second link :P
Max
2008-12-12 15:04:50
ehm, thanks I forgot that :P
Braveyard
2008-12-12 15:17:55
+15
A:
If using the .NET 2.0 (or later) framework you can use the CopyFromScreen() method detailed here:
http://www.geekpedia.com/tutorial181_Capturing-screenshots-using-Csharp.html
//Create a new bitmap.
bmpScreenshot = new Bitmap(Screen.PrimaryScreen.Bounds.Width,
Screen.PrimaryScreen.Bounds.Height,
PixelFormat.Format32bppArgb);
// Create a graphics object from the bitmap.
gfxScreenshot = Graphics.FromImage(bmpScreenshot);
// Take the screenshot from the upper left corner to the right bottom corner.
gfxScreenshot.CopyFromScreen(Screen.PrimaryScreen.Bounds.X,
Screen.PrimaryScreen.Bounds.Y,
0,
0,
Screen.PrimaryScreen.Bounds.Size,
CopyPixelOperation.SourceCopy);
// Save the screenshot to the specified path that the user has chosen.
bmpScreenshot.Save("Screenshot.png", ImageFormat.Png);
Gary Willoughby
2008-12-12 15:04:39
A:
Here is a similar post: how-can-i-save-screenshot-directly-to-a-file-in-windows.
The code is with win32 calls. Gary code is good too. Simply two different way to do it :)
Daok
2008-12-12 15:38:45
A:
You can play around with SendKeys and get the behavior you want as well.
SendKeys PrtScrn for the full screen.
SendKeys Alt+PrntScrn for the current window only.
Access the Clipboard for the image. (You may want to save anything already on the clipboard prior to using SendKeys and put whatever was on there back when you're done.)
Austin Salonen
2008-12-12 16:14:30
Good idea I'll give it a try, hope it's easy to deal with the clipboard
Omar Abid
2008-12-13 11:36:33