Alex
Alex

Reputation: 4938

AutoScaling WinForm Display (Small, Medium)

First and foremost, please forgive me but my screenshots are in French due to my Windows installation at work. It is still very easy to understand though. I'll include screenshots to make it more visually appealing.

Here's some background information:

Form properties

My application is a windows form that was developped in a default (small - 100%) display. Like so: Small (default) display

As you can see, the "Petite" or Small display is the default selection.

Small Display - 100% (default)

Here is how my application looks with this setting. This is the correct display Perfect display

Medium Display - 125%

The red rectangles point out the unwanted empty space. Display at Medium or 125 percent

I have tried:

I really thought it was having a scaling problem because of the anchoring and docking. Although that didn't seem to be the problem ... What seems to be having trouble is the Tab Control and Listviews ...

Some users (most) have their settings as the default (100%) but there are a few who have it at a Medium setting, causing this scaling issue. Is there a way to fix this?

Upvotes: 5

Views: 17225

Answers (3)

Mutebi Bashir
Mutebi Bashir

Reputation: 1

Just click on the form and go to property pane. Find the Anchor element and click the dropdown. You click on all the lines in the square structure to become grey. Then click enter. Problem resolved.

Upvotes: -1

Alex
Alex

Reputation: 4938

I fixed my issue by putting the tab controls and list views in a tablelayoutpanel. Everything that wasn't scaled properly had to be put inside a TableLayoutPanel. I kept my AutoScaleMode to DPI and AutoSize to True

Be sure to dock everything in their parent containers.

Here's the document outline for the more visual (like me):

Outline

Upvotes: 2

tsiorn
tsiorn

Reputation: 2236

I cant see your screenshots or links for some reason so I cannot visualize the problem. If scaling is the problem, try setting AutoScaleMode to None.

I recently had to do this because my winform app was image intensive and it would not render correctly on Medium Settings because I built it using the default Small Settnigs display. Changing scale mode to None worked for me.

Upvotes: 3

Related Questions