IT Community - Software Programming, Web Development and Technical Support

How to take screenshots in C#?

This is a discussion on How to take screenshots in C#? within the C# Programming forums, part of the Software Development category; How to take screenshots in C#?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-22-2007, 11:06 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Question How to take screenshots in C#?

How to take screenshots in C#?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-22-2007, 11:33 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Default Re: How to take screenshots in C#?

If you like to take screen shots in windows forms in dotnet,use Screen class contains the clipped area .Use the below code to copy the screen shots


foreach (Screen screen in Screen.AllScreens)
{

Bitmap bmp = new Bitmap(screen.Bounds.Width, screen.Bounds.Height);

Graphics g = Graphics.FromImage(bmp);

g.CopyFromScreen(0, 0, 0, 0, bmp.Size);

g.Dispose();


//Save the images here, or display them in picture boxes, etc.
}
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 08-14-2007, 09:33 AM
H2o H2o is offline
D-Web Analyst
 
Join Date: Jul 2007
Posts: 246
H2o is on a distinguished road
Default Re: How to take screenshots in C#?

hi

I got error for using webform page,pls tell me any idea



thank u
__________________
H2O

Without us, no one can survive..
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 01:28 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0