Click here to Skip to main content
15,885,890 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I am doing a project with VB.Net.

My Form (Frm_Main) is currently running in 1600*1900 resolution.

When i run in another computer which have 1366*768 resolution, My (Frm_Main) is larger than screen size and some of the form's components is displaying outside of the screen.

How can i do my (Frm_Main) size to compatable with all screen's resolution?
Posted
Updated 15-Oct-12 0:16am
v2

You can't, in most cases.
You can in WPF, because it is designed differently, and has zooming an scales built in - but Winformas apps do not, and generally do not scale well. There are ways to move and resize controls automatically, but it it does not affect text at all, and that can make things look for strange, or unreadable.

If you need to design a winforms at 1600x1900 to fit all your controls in the first place, then I suspect you need to look at your UI in some detail, and reduce the controls count - if only to make it more usable for the user. Grouping controls on tab pages may be a way to go.
 
Share this answer
 
Comments
heinhtataung 15-Oct-12 6:48am    
Do u mean to do a new project with WPF instead of my current project ?
OriginalGriff 15-Oct-12 7:29am    
Basically, yes - or redesign your whole UI to fit on a more "normal" screen size
heinhtataung 15-Oct-12 23:36pm    
Thanks sir ! :)
By adding items to TableLayout Panel and writing this code to form_Load

VB
If SystemInformation.WorkingArea.Height > 1200 Then
          Me.Scale(New SizeF(1.3F, 1.3F))
      End If
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900