c# - Windows Form size issue on different resolutions -


i newbie in window forms development, after developing forms have noticed forms not displayed correctly in different resolutions, form go beyond screen in resolutions

i wondering if there setting can auto adjust form according resolution, or there hack or technique can use design form.

please elaborate answer bit quite fresh windows form development.

thanks

the issue here more not working way expect. in winforms development, when design form setting size. follows function of default font size on machine form being displayed on , not directly correlate resolution on display in question. so, if design large form many controls or large controls, may display fine @ high resolution not @ low one. better feel of sizing, take @ form1.designer.cs file , see size values being set controls. these sizes not equate pixels, should give relative sizing. should research dialog units on msdn or elsewhere.

you write code react resolution in form load event, in end size partially constrained number of widgets need display. if had multi-line edit field, grid control, tree control or other large widget, automatically resize based on current display resolution , resize window @ same time. application specific decision based on needs, why windows not try automatically resize you.

as noted above, wpf gives more flexible form definition model , can more reactive realign widgets, in end if form busy enough, wpf form have same issues on lower resolution.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -