Command to switch main display scaling to 100%

Viewed 1044

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?

1 Answers

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.

Related