Click here to Skip to main content
15,888,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I've created a desktop application in Visual Studio 2010 (.Net framework 3.5). When I run this application on my machine having resolution 1920 * 1080, it runs fine.
Now when I run this application on another machine having resolution 3200 * 1800, the fonts get blurred.

Based on the article here, I made my application "DPI aware".

Also, I’ve made the below changes for the main form:
C#
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;


What I have tried:

After making these changes, it runs fine on my machine having resolution 1920 * 1080. On the high resolution machine, the fonts look good but the size of all the controls on this form changed.

Can someone please help?

Thanks in advance!
Posted
Updated 29-Nov-16 6:20am
v2
Comments
CHill60 9-Oct-15 6:40am    
Wouldn't it make sense to ask the question of the author of the "article" ?(read "Solution to a post on a rival site")

1 solution

try
C#
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

High resolutions & windows forms are not the best combo. Conscider moving your application to WPF.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900