C# application looks different on 2 different machines with the sameresolution

P

peetersb

Hello,

I've developed a C# windows application in full screen mode. No
borderstyle and the size of the main form is 1680 * 1050
The resolution on both pc's is 1680 * 1050.
On my developement machine it look ok.
See pic http://www.bapetc.be/good.JPG
But when I run the same application on a other pc with the same
resolution (1680 * 1050) it looks very bad.
see picture http://www.bapetc.be/bad.JPG

I don't know the reason for that.

Thanks!
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

It might be a number of reasons, like the Font Size and/or the Windows Style
 
P

peetersb

Windows style? The difference is big, not?

Both have a resolution of 1680 * 1024...
How can I make this pc independent?
 
B

Ben Voigt [C++ MVP]

Hello,

I've developed a C# windows application in full screen mode. No
borderstyle and the size of the main form is 1680 * 1050
The resolution on both pc's is 1680 * 1050.
On my developement machine it look ok.
See pic http://www.bapetc.be/good.JPG
But when I run the same application on a other pc with the same
resolution (1680 * 1050) it looks very bad.
see picture http://www.bapetc.be/bad.JPG

I don't know the reason for that.

You've got DPI-dependent scaling turned on. Specify font sizes in pixels
instead of points, and turn off scaling and everything should be ok.
 
B

Ben Voigt [C++ MVP]

Thanks! Is this a windows setting or a setting in my application?

DPI is a Windows setting, but you shouldn't require your users to change
their DPI just to run your app.

So change the way your app selects fonts to use pixels instead of DPI, if
you want it always to take up the same resolution screen.
 
P

peetersb

DPI is a Windows setting, but you shouldn't require your users to change
their DPI just to run your app.

So change the way your app selects fonts to use pixels instead of DPI, if
you want it always to take up the same resolution screen.

Thanks! In visual studio? Do you know where to set setting. I'm
looking for more than a hour... Sorry...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top