I am having a strange effect when editing a legacy Windows Forms project in Visual Studio 2015 on my new computer with a high DPI (150%) setting. When I edit the project on the laptop screen (DPI 150) everything appears normal and the forms' default font is the standard size of 8pt (note Visual Studio's menus and text all appear correctly), but when I dock the laptop and use on my monitors with a DPI of 100 all the forms get increased to a font size of 15.25. It's almost as if somewhere, when I installed Visual Studio (and SQL Server Management Studio for that matter), they registered the DPI 150% setting as the default and when I drop back down to 100% everything is getting inverted (150/100). Anyone have any experience with this? I can't follow other articles to get my Windows Forms project DPI-Aware if I can't get back to a 96 DPI baseline.
0
votes
1 Answers
0
votes
I have solved my own issue. Documenting here for anyone else who might have this strange experience. When docked, I had three displays connected, two 1920x1200 monitors through DVI and one 1024x768 projector through VGA. Apparently this extra projector connection was creating some sort of strange DPI issues in Visual Studio's form designer (and SQL Server Management Studio's query results). Disconnecting the VGA connection fixed the problem.
AutoScaleModeproperty of the Form set to? Make a backup of your project and setAutoScaleModeto None and save the project. Now change your DPI setting and see if the problem still exists. If the AutoScaleMode is set, the propertyAutoScaleDimensionswill be recorded in the form.designer.cs (or vb) file. This value is read when you open the project and if things have changed, the form is scaled. - TnTinMn