Creating resolution independent applications in VB.NET
-
I have created a VB.NET app, a small mcq based quiz. Now when i run it on a different resolution than my PC then all the items(labels,textboxes etc) on the form get scattered. How can we create resolution independent applications?
Windows Forms in .NET offers a great method variety of Autosizing, Docking and Align properties that should make it easier to get the positioning right for varying resolutions. You'll need to play around with them a bit to get a feel for it. Alternatively, if these don't offer enough power, you'll need to write your own control-positioning/sizing code in the Resize event for the form.
-
I have created a VB.NET app, a small mcq based quiz. Now when i run it on a different resolution than my PC then all the items(labels,textboxes etc) on the form get scattered. How can we create resolution independent applications?
Try Anchoring or Docking[^] your controls. Remember, the Anchor and Dock properties are mutually exclusive. Only one can be set at a time, and the last one set takes precedence.
Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D