Click here to Skip to main content
15,919,500 members
Home / Discussions / C#
   

C#

 
GeneralRe: Save Form screen as jpg-file Pin
anderslundsgard25-Sep-07 0:18
anderslundsgard25-Sep-07 0:18 
GeneralRe: Save Form screen as jpg-file Pin
Ajay.k_Singh25-Sep-07 0:43
Ajay.k_Singh25-Sep-07 0:43 
Yes because in the previous code DrawToBitmap function of a particular Form was used, this will return image of only one form.

However if you have multiple Forms on screen and you want to take image of whole screen, you may try following code which uses CopyFromScreen function and it will return image of every thing which is on screen –

int wth, ht; //modify width and height as per need

wth= 1000;
ht= 900;

Bitmap bmp2=new Bitmap(wth,ht);

Graphics grp = Graphics.FromImage(bmp2);

Point x1=new Point();
Point x2=new Point ();

x1.X=0;
x1.Y=0;

x2.X=0;
x2.Y=0;

Size sz = new Size(wth, ht);

grp.CopyFromScreen(x1,x2,sz, CopyPixelOperation.SourceCopy);


This should give you what you want. Let me know the resultSmile | :) .

-Dave.

Dave Traister,
ComponentOne LLC.
www.componentone.com

GeneralRe: Save Form screen as jpg-file Pin
anderslundsgard25-Sep-07 4:47
anderslundsgard25-Sep-07 4:47 
QuestionEquivalent of CStringArray in C# Pin
Mushtaque Nizamani24-Sep-07 22:26
Mushtaque Nizamani24-Sep-07 22:26 
AnswerRe: Equivalent of CStringArray in C# Pin
Martin#24-Sep-07 22:32
Martin#24-Sep-07 22:32 
GeneralRe: Equivalent of CStringArray in C# [modified] Pin
Mushtaque Nizamani24-Sep-07 22:39
Mushtaque Nizamani24-Sep-07 22:39 
QuestionInheritance in C# (class + interface) Pin
kaminem24-Sep-07 22:22
kaminem24-Sep-07 22:22 
AnswerRe: Inheritance in C# (class + interface) Pin
Colin Angus Mackay24-Sep-07 22:55
Colin Angus Mackay24-Sep-07 22:55 
QuestionEmpty Catch Pin
Malcolm Smart24-Sep-07 22:04
Malcolm Smart24-Sep-07 22:04 
AnswerRe: Empty Catch Pin
pmarfleet24-Sep-07 22:16
pmarfleet24-Sep-07 22:16 
GeneralRe: Empty Catch Pin
Malcolm Smart24-Sep-07 22:22
Malcolm Smart24-Sep-07 22:22 
GeneralRe: Empty Catch Pin
Colin Angus Mackay24-Sep-07 22:33
Colin Angus Mackay24-Sep-07 22:33 
GeneralRe: Empty Catch Pin
pmarfleet24-Sep-07 22:35
pmarfleet24-Sep-07 22:35 
AnswerRe: Empty Catch Pin
Guffa24-Sep-07 23:11
Guffa24-Sep-07 23:11 
GeneralRe: Empty Catch Pin
Scott Dorman25-Sep-07 3:59
professionalScott Dorman25-Sep-07 3:59 
GeneralRe: Empty Catch Pin
Guffa25-Sep-07 10:21
Guffa25-Sep-07 10:21 
QuestionDevelop Outlook in C# Windows forms Pin
senselva24-Sep-07 21:58
senselva24-Sep-07 21:58 
AnswerRe: Develop Outlook in C# Windows forms Pin
Corinna John25-Sep-07 0:56
Corinna John25-Sep-07 0:56 
QuestionGoogle Suggest feature with ASP.NET 2.0 Pin
jebin k24-Sep-07 20:39
jebin k24-Sep-07 20:39 
AnswerRe: Google Suggest feature with ASP.NET 2.0 Pin
dengboo24-Sep-07 20:48
dengboo24-Sep-07 20:48 
GeneralRe: Google Suggest feature with ASP.NET 2.0 Pin
jebin k25-Sep-07 1:25
jebin k25-Sep-07 1:25 
QuestionReportingService.GetReportParameters Pin
amraouf24-Sep-07 20:18
amraouf24-Sep-07 20:18 
AnswerRe: ReportingService.GetReportParameters Pin
pmarfleet24-Sep-07 21:35
pmarfleet24-Sep-07 21:35 
GeneralRe: ReportingService.GetReportParameters Pin
amraouf24-Sep-07 21:52
amraouf24-Sep-07 21:52 
GeneralRe: ReportingService.GetReportParameters Pin
pmarfleet24-Sep-07 22:11
pmarfleet24-Sep-07 22:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.