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
Loading
venkata kumarPosted Oct 1, 2012, 1:48 AM
form is resizing.
but controls are not resizing
Gohil JayendrasinhPosted Oct 1, 2012, 1:40 AM
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);