6

When opening WinForms controls/forms in Visual Studio 2022 on my high DPI display, this message is being displayed:

enter image description here

Scaling on your main display is set to 150%. Restart Visual Studio with 100% scaling

I could then click the link and Visual Studio starts with 100% scaling.

When I accidentally forget to click the link and instead closed the form, and then open it again, the message is gone:

enter image description here

What I do then is be restart Visual Studio, open the form again, see the message again, click it and finally get Visual Studio in 100% scaling mode.

I would avoid this extra restart just to get the message with the link again.

Question

Is there a hotkey, menu item or command in Visual Studio 2022 to restart the IDE with 100% scaling?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 2
    I do not know of a menu command, but there are ways to start VS as DPI-Unware. See: [Disable DPI-awareness to address scaling issues with Windows Forms Designer in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/designers/disable-dpi-awareness?view=vs-2022). – TnTinMn Nov 19 '21 at 15:47

3 Answers3

4

In VS 2022:

Tools > Command Line > Developer Command Prompt

devenv /noScale

https://learn.microsoft.com/en-us/visualstudio/designers/disable-dpi-awareness?view=vs-2019

  • VS Code will follow your default display scale setting for your laptop. If you want to change it so that you won't have to restart, then change your default Settings > Display to 100% (125% percent is recommended by the system when you're not developing.) – adomakor412 Oct 04 '22 at 17:15
3

As I was also looking for this, I'll post this as an answer; this is documented in @TnTinMn's link. You need to open a developer command prompt and enter the following command:

devenv /noScale

This will launch VS as if you clicked on "Restart with 100% scaling". On Windows I recommend creating a shortcut on the taskbar for the dev prompt (pin it on the taskbar) which for VS2019 Enterprise is located here:

%comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat"

This will save the "extra" restart (so 1 restart instead of 2). Tested on Win10, VS2019.
For VS2022 Enterprise:

%comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
evilmandarine
  • 4,241
  • 4
  • 17
  • 40
2

Modify Shortcut : Just Right Click on visual studio icon and click on properties.

As Seen in Screen Short

then modify target by adding /noscale command at the end of exe name and path. "C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\devenv.exe" /noScale

as seen in screen short

Simply Click ok and open visual studio with 100% scaling and automatic scaling disabled always. no e