Click here to Skip to main content
15,849,130 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI Team,

I have Windows form application in vb.net project. In this I have a design view and I had respective loading methods to launch the application. It was working fine so far. But in High DPI resolution machine, the design not rendering properly. Some text getting invisible.

What I have tried:

For example, if the label name as "Student Name" means, in High resolution machine it is showing as "Student Na" only. "Me" are missing from the label value.

I was searching the solution in google and getting the below,

I have created the .bat file into the debug folder and placed the below command in that bat file.
"%programfiles%\<appfoldername>\<app>.exe" /T REG_SZ /D ~DPIUNAWARE /F

Based on the above, I have modified based on my project location in bat file as like below,
"%programfiles%\C:\Users\Projects\TestApplication\bin\Debug\TestApplication.exe" /T REG_SZ /D ~DPIUNAWARE /F

Application Framework as 4.6

But the problem not getting resolved. Is there anything I did wrong?

Could you please anyone suggest a solution for this issue?

Thanks in advance.

Regards,
Arunkumar Murugesan
Posted
Updated 26-Aug-20 6:14am
v2

How is your application handling those command line options? You may need to read High DPI support - Windows Forms | Microsoft Docs[^].
 
Share this answer
 
Those command line options will not do anything at all unless you specifically write code to handle them. There is no automatic command line support added to your apps by Visual Studio or .NET.

High-DPI awareness was improved in Windows Forms app in .NET 4.7 and above. See High DPI support - Windows Forms | Microsoft Docs[^] for details.
 
Share this answer
 
Comments
Arunkumar Murugesan 27-Aug-20 1:06am    
Hi Richard and Dave,

Thanks for your update. Is this solution will be supported for 4.6 framework?
Dave Kreskowiak 27-Aug-20 9:52am    
What part of ".NET 4.7 and above" did you not understand?

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