-3

Here at work I have been relegated to working on an old 4:3 monitor. The application I am working on in VB.NET (VS 2008) has several forms and controls that are sized to a specific height and width. They look fine on my monitor, but when I recently released a Beta for Users to try, the users that had widescreen monitors had stretched dialog forms and stretched controls on those forms. Is there a form property to set, or a programming technique to use, in order for the form and all of it's controls to display EXACTLY to the width and height specified?

David P
  • 2,027
  • 3
  • 15
  • 27
  • I love how 2 people have voted down my question, but have not bothered to write even part of sentence explaining why. :( – David P Aug 06 '15 at 19:38
  • That said, Questions seeking debugging help (**"why isn't this code working?"**) must include the desired behavior, a **specific problem or error** and **the shortest code necessary** to reproduce it **in the question itself**. Questions without **a clear problem statement** are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example.](http://stackoverflow.com/help/mcve) – Federico Berasategui Aug 06 '15 at 19:50
  • I inherited the WinForms application from a previous developer. I don't have the option or the time to convert it to WPF. – David P Aug 06 '15 at 19:55
  • How would you like me to phrase it. "Set width of form to 1000 in windows form designer. When run on pc with wide screen monitor, form gets stretched to 1600+" – David P Aug 06 '15 at 19:56
  • I altered text of question. Hopefully this helps settle any silly superficial objections you had over the question. – David P Aug 06 '15 at 20:04
  • 1
    `Hopefully this helps settle any silly superficial objections you had over the question` - Sorry, Maybe I didn't express myself correctly, let me try again: Questions seeking debugging help (**"why isn't this code working?"**) must include the desired behavior, a **specific problem or error** and **the shortest code necessary** to reproduce it **in the question itself**. Questions without **a clear problem statement** are not useful to other readers. See: [How to create a Minimal, Complete, and Verifiable example.](http://stackoverflow.com/help/mcve) – Federico Berasategui Aug 06 '15 at 20:13
  • The problem with the question is that you are making your audience guess at the problem. Could be the video card settings-- large font? Could be something else. You could try creating a new project that shows the same problem and post the code from that. – LarsTech Aug 06 '15 at 20:18
  • [Read this](http://stackoverflow.com/questions/23259261/automatically-adjusting-winform-and-controls-to-screen-size) – Zohar Peled Aug 07 '15 at 13:34

1 Answers1

0

I ended up fixing the problem myself by setting the .AutoScaleMode of the form to "None", and setting all my fonts to use pixels instead of points.

Unfortunately, this was not an issue of code, but rather of design. Sure, it's easy enough to post code snippets, but if I need to post a whole windows form application that's another story altogether.

David P
  • 2,027
  • 3
  • 15
  • 27