C# windows Form Project, in laptop touch screen form shrinks and moves when reloads

Gennady Gurin 186 Reputation points
2026-10-02T22:05:35.2333333+00:00

I have Windows Form Project targeting old net framework 4.8, In my project I have to reload a form on certain conditions, so on my PC computer everything working normally but when testing on laptop touch screen the form shrinks and moves when reloading.

Upon searching I had to add line: in my Program.cs file

here: Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);

However, it is undefined. So, upon searching I had to add

lines into my app.config file and create app.manifest file as well.

Anyway, all those files in working directory.

And still is underfired, not sure what to do next?

Anyone responds, thanks in advance.

Windows development | Internet Information Services
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.