Form Size

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Wondering if anyone else is having a problem with form sizes (although this applies to controls as well). If I take a project that I have designed on my desktop and load it on my laptop all of the sizes for forms and the controls on them change. Everything is roughly in the same proportion but as an example a form that was 490 x 440 becomes 586 by 510 on my laptop. I do not know if this is a quirk with .NET or the NVIDIA video driver on my DELL M50 laptop

Since the proportions are the same, you might think that the problems caused by this are minimal, however, it keeps you from sizing forms in code, makes setting minimum and maximum sizes impossible, and leads to other very unpredictable behavior like controls not being visible because they are off the screen (the New Project and Open Project buttons on the Start page for Visual Studio have this problem on my laptop as an example)

I have checked the DELL website and they do not have any updated drivers for me to try

Would appreciate hearing back from anyone who has any knowledge of what the problem might be.
 
Did you try disabling the auto scaling for the form?

James P.

M McKinney said:
Wondering if anyone else is having a problem with form sizes (although
this applies to controls as well). If I take a project that I have designed
on my desktop and load it on my laptop all of the sizes for forms and the
controls on them change. Everything is roughly in the same proportion but as
an example a form that was 490 x 440 becomes 586 by 510 on my laptop. I do
not know if this is a quirk with .NET or the NVIDIA video driver on my DELL
M50 laptop.
Since the proportions are the same, you might think that the problems
caused by this are minimal, however, it keeps you from sizing forms in code,
makes setting minimum and maximum sizes impossible, and leads to other very
unpredictable behavior like controls not being visible because they are off
the screen (the New Project and Open Project buttons on the Start page for
Visual Studio have this problem on my laptop as an example).
I have checked the DELL website and they do not have any updated drivers for me to try.

Would appreciate hearing back from anyone who has any knowledge of what
the problem might be.
 
I can disable AutoScale but that just creates more problems like labels no longer displaying in the appropriate places. I guess that the best thing to do would be just to get the AutoScaleBaseSize when a form is loaded and then adjust things like minimum and maximum sizes by comparing the AutoScaleBaseSize to what it was in the development environment (since things like minimum width and height are not auto scaled). You would think that they would be just to keep everything in sync but they're not.

Note that adjusting for the difference in AutoScaleBaseSize does not solve the problem entirely but it can get you reasonably close.

Makes me kind of nervous though that I'm just creating other unknown bugs by attempting to work around this issue or that I'm doing something that won't be supported the same in the future.

Thanks for the input.
 
Back
Top