I am developping a winForm application whitch works on several screen resolutions.
how to adapt my application to the screen resolution
how to adapt my application to the screen resolution
thanks for help
best regard
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 8, 2009, 2:42 AM EDT
Posted Jul 8, 2009, 3:10 AM EDT
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 8, 2009, 3:24 AM EDT
Posted Jul 8, 2009, 10:42 PM EDT
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 8, 2009, 11:33 PM EDT
private void dynamicSizeForm_Load(System.Object sender, System.EventArgse)
{
Screen scr = Screen.PrimaryScreen;
this.Left = (scr.WorkingArea.Width – this.Width) / 2;
this.Top = (scr.WorkingArea.Height – this.Height) / 2;
}
You can use above code to fix the location and size of windows form when it loads
Screen.PrimaryScreen
Returns a Rectangle structure that represents the bounds
of the display area for the current screen, minus the space
taken for the taskbar and any other docked windows.
Posted Jul 9, 2009, 12:30 PM EDT