DPI Unaware setting for .net6 winforms

I had a question regarding topic this about 6 months ago. The solution provided worked exactly as needed. I now have to convert the .net framework 4.8 application to .Net 6 Winforms. The original response had me add the line “assembly: System.Windows.Media.DisableDpiAwareness]” to the AssemblyInfo.cs of the project.

The .Net 6 Winforms does not have the AssemblyInfo.cs. Is there a place where this line, or an equivalent can be placed in a .Net 6 Winform project to accomplish the same thing?

Thanks.

Hi Lindsey,

Note that it doesn’t have to be in “AssemblyInfo.cs”, it can be in wherever you want.
So, try adding it to let’s say the “Program.cs” file.
Does this solve your issue?

Regards,
Mario

Thank-you Mario. Yes this appears to work. regards, Lindsey.