Hi All... I am just struggling here with a form and getting a "universal" layout when using on several computers/screens. I think I have read so many things on this that I am totally lost on what the rule should be when creating a form that should look the way I want on almost any computer. The attached picture is what I am dealing with on a real simple form. The top section is of course how I want it to look, the bottom section is how it looks on a couple other computer screens. Both computers running WIN10, but monitors are of different size. I have made some changes to DPI, FONT etc. Made my Font sizes the same, but I just cant seem to get it right. Any suggestions?
I’d use a tablelayoutpanel, with dock = fill (whole form). Add columns and rows to your TLP, then use anchoring or docking in the TLP cells to align your controls in a uniform layout. That’s my best advice. Think yourself lucky you’re not trying to layout controls with Java Swing l
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
Thanks for all of the thoughts and ideas on this, I am just now playing around with it. Not sure why, but here is what it looks like at runtime. You can see my TLP cell height, but it expands the labels much higher. I have the labels docked to the bottom. What seems to cause me some trouble is the group-boxes they don't stay in really good alignment with my textboxes.
**Edit: I left out "Me.TableLayoutPanel1.Dock = DockStyle.Fill" on Form_Load and it looks ok now. Still a long way to go for understanding all of the controls.
Last edited by mikeg71; Feb 9th, 2022 at 05:18 PM.