hi
can any one help me
i created windows application with screen size 1024*780
but i want to change screen size 800*600 dynamically.
that changes need happen based on screen resolution.
actually i done resize application but controls are not resizing.
Thanks & Regards
Kumar
Windows appliction resize application based on screen resolution dynamically
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Gohil JayendrasinhRank #490 · 5K reputationPosted Sep 30, 2012, 9:40 PM EDT
Screen scr = Screen.PrimaryScreen;
this.Left = (scr.WorkingArea.Width - this.Width) / 2;
this.Top = (scr.WorkingArea.Height - this.Height) / 2;
// Retrieve the working rectangle from the Screen class
// using the PrimaryScreen and the WorkingArea properties.
System.Drawing.Rectangle workingRectangle =
Screen.PrimaryScreen.WorkingArea;
// Set the size of the form slightly less than size of
// working rectangle.
this.Size = new System.Drawing.Size(
workingRectangle.Width - 10, workingRectangle.Height - 10);
// Set the location so the entire form is visible.
this.Location = new System.Drawing.Point(5, 5);
venkata kumarRank #5,034 · 314 reputationPosted Sep 30, 2012, 9:48 PM EDT
form is resizing.
but controls are not resizing