Dan
Dan

Reputation: 45741

Winforms app controls change size on production PC

I'm developing a small winforms app for internal use. My dev pc runs Windows 7 however most of the other team members (i.e. the users of the app) are running Windows 8.1. The winforms controls all render slightly differently in Windows 8.1 and this causes some problems such as buttons cutting off text due to size differences.

Is there a way to see how the app will render in Windows 8.1 on my Windows 7 dev PC? Note I'm talking about a regular winforms app, not a Metro style app.

I'm developing in C# using Visual Studio Professional 2013


EDIT

Note that I have now also tried using https://github.com/viperneo/winforms-modernui and I get similar behaviour. I have a DateTimePicker next to a Button and I make their height's the same. On my Windows 7 dev PC this looks correct. However when I run it on a Windows 8 "production" PC the button height is now shorter than the DateTimePicker, things become misaligned in general and some controls even start to partially overlap. The screen resolutions of the two PCs is the same

Upvotes: 1

Views: 158

Answers (1)

Scott Wylie
Scott Wylie

Reputation: 4735

Check to see what DPI setting that all/each of your users are using. Windows Forms will always render differently with each DPI scaling setting regardless if it is Windows 7 or Windows 8. Takes a fair bit of work in dev and testing with each major DPI increment but it can be done to get a decent look.

Upvotes: 1

Related Questions