Lee Loftiss
Lee Loftiss

Reputation: 3195

VB net control form size over different resolutions

I am working with a VB window that seems to want to resize depending on the resolution of the monitor.

Right now, I have VS2010 open on a monitor that is 1366 x 768. I have the form set to the following dimensions:

MaximumSize, MinimumSize and Size are all set to 948x580.

When I run the app, it looks fine.

Now, I have another monitor that has the resolution set to 1680x1050.

When I run the app, the window is 1263x705.

I was under the impression, that forcing the Max and Min sizes would lock the size of the window. Is this correct? Is there some other setting I am possibly missing?

take care, lee

Upvotes: 0

Views: 7192

Answers (1)

Mark Hall
Mark Hall

Reputation: 54522

This is just a guess but what is your Form.AutoScaleMode set to? It is defaulting to the AutoScaleMode.Font Enumeration on my system even though the documentation says it defaults to AutoScaleMode.None. You may want to look at this MSDN link on AutoScaling also.

  1. None - Automatic scaling is disabled.

  2. Font - Controls scale relative to the dimensions of the font the classes are using, which is typically the system font.

  3. Dpi - Controls scale relative to the display resolution. Common resolutions are 96 and 120 DPI.

  4. Inherit - Controls scale according to the classes' parent's scaling mode. If there is no parent, automatic scaling is disabled.

Upvotes: 3

Related Questions