0

I have a problem I couldn't quite find the fix for. To make it clearer, I will post pictures, instead of just trying to describe it with text. My base application looks like this: Just launching the program, nothing that could do anything was clicked But If I try to open the file dialog, which is done by clicking the 'Select files' in my case: Opened dialog The form completely changes sharpness: Form after opening dialog

( note: the entire form rescales, its as if the width was suddenly shorter, but I checked it manually and it apparently doesn't change )
The thing is.. the form after looks much clearer and sharper. I don't know why. I want to somehow implement the way the form looks after opening the dialog to the way the form looks before the dialog, but I didn't find either a fix to make everything blurry or a fix to make everything sharp.

Another thing, this is basically the finished product. I don't know if I should try to just.. create a new project and try to copy paste everything, it could create some issues, so I scratched that off the idea list.

I tried changing the AutoScale features of basically everything, and nothing works. Every form is set to AutoScaleMode DPI, and that makes it less blurry than before, but still noticeably ugly.

Veverke
  • 9,208
  • 4
  • 51
  • 95
Aakuho
  • 33
  • 4
  • 1
    Is this Windows Forms? If yes, please add the "winforms" tag. And please remove the "visual-studio" tag which is for questions regarding the development environment itself. – Klaus Gütter May 18 '23 at 11:48
  • Thank you, I'll update it right away – Aakuho May 18 '23 at 11:53
  • I've found with Winforms that sometimes a control get a property set and the only way of resolving issue is to delete the control and add. I assume you are using the designer to add items. I would make a copy of the designer text file. Then delete the entire form. Next add form back to project. Finally copy the saved designer text and add to the new form which will add back all the controls. – jdweng May 18 '23 at 11:54
  • 2
    Your app becomes DpiAware (`SystemAware`). You should design your app for DpiAwareness (`PerMonitorV2`) from the start – Jimi May 18 '23 at 12:09
  • Sure, will do it next time, however, what can I do it here? – Aakuho May 18 '23 at 12:16
  • 3
    It's something you have to do now. If you're targeting .NET Framework, read here: [High DPI support in Windows Forms](https://learn.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms), otherwise (assuming .NET 7+) - the notes about `app.manifest`'s compatibility settings still stand - edit the Project's File and change or add: `PerMonitorV2` in the main `` – Jimi May 18 '23 at 12:23
  • This is caused by a shell extension, programmers tend to have a lot of them. It does something a shell extension should absolutely never do, make itself dpiaware. Chase the rogue one with SysInternals' AutoRuns utility. – Hans Passant May 18 '23 at 13:43

0 Answers0