[program-l] Re: [EXTERNAL] Re: Visual Studio WinForms Designer with High DPI

  • From: "Dante Gagne" <dmarc-noreply@xxxxxxxxxxxxx> ("danteg")
  • To: "program-l@xxxxxxxxxxxxx" <program-l@xxxxxxxxxxxxx>, "Dante Gagne (danteg)" <dmarc-noreply@xxxxxxxxxxxxx>, "Merrie McGaw (SHE/HER)" <Merrie.McGaw@xxxxxxxxxxxxx>, Devendar Reddy A <dreddy@xxxxxxxxxxxxx>
  • Date: Tue, 11 Jan 2022 17:17:58 +0000

Huh... interesting. I'll need to see if the infobar for the high resolution 
specifically has some different behavior. I tried this with the infobar tester 
that we've got to make sure the keystroke worked... and in true tech support 
fashion

"It worked for me"

So, let me dig around and see if I can figure out why you're running into the 
issue. As a workaround, did you try the command line switch to force it out of 
HighDPI mode? As Devendar mentioned, you can add /noscale to your Visual Studio 
shortcut and that should give you the same experience as if you had found and 
invoked that infobar.

--Dante

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On Behalf 
Of Karl-Otto Rosenqvist
Sent: Tuesday, January 11, 2022 4:57 AM
To: program-l@xxxxxxxxxxxxx; Dante Gagne (danteg) 
<dmarc-noreply@xxxxxxxxxxxxx>; Merrie McGaw (SHE/HER) 
<Merrie.McGaw@xxxxxxxxxxxxx>; Devendar Reddy A <dreddy@xxxxxxxxxxxxx>
Subject: [program-l] Re: [EXTERNAL] Re: Visual Studio WinForms Designer with 
High DPI

Hi!
I just tried the solution you provided but the focus doesn't arrive at the 
infobar.

Key(s) pressed and speech feedback.
1. Press Alt -> File closed, Alt + F.
2. Ctrl + Tab - Standard toolbar, New project...
3. Ctrl + Tab - Show connected user information card Button.
4. Ctrl + Tab - Toolbar, Visual Studio Live Share...
5. Ctrl + Tab - Feedback Button...
6. Ctrl + Tab - File... back on the main menu.

If I hover the mouse over the infobar NVDA says:
Scaling on your main display is set to 200%.    Restart Visual Studio 
with 100% scaling    Help me decide

It doesn't seem as I can reach the infobar with the provided key combinations.


Regards

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@xxxxxxxxxx
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmawingu.se%2F&amp;data=04%7C01%7CDanteG%40microsoft.com%7C6943ebb5d0f34eabc7ff08d9d501de3d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637775027042692982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=N5Cv1gSAaPZoWhTIIfnBWzzi%2BGnLRqQjHaS3BNmnW7Y%3D&amp;reserved=0

Den 2022-01-05 kl. 00:34, skrev Dante Gagne (danteg):

Well, I learned something today.

If you tap Alt in Visual Studio, this will move focus to the menubar (like it 
does in pretty much any other Windows application). However, while focus is 
on the menubar, you can hit Ctrl+Tab to cycle through the top level menus and 
toolbars. This includes the Gold colored "Infobar" that includes the message 
Karl is talking about here to restart at 100% scaling.

When you arrive on the infobar, it should just read the contents. Then you 
can hit tab to get to the command buttons that live inside it. I'll be the 
first to say that this isn't exactly the most discoverable keyboard 
interaction (which tells me that we need to raise the discoverability of it), 
but if you've got an infobar like the one we're describing here, this 
keyboard model should let you get to the controls on that infobar and 
interact with them.

--D

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx> On 
Behalf Of Karl-Otto Rosenqvist
Sent: Tuesday, January 4, 2022 1:50 PM
To: Merrie McGaw (SHE/HER) <Merrie.McGaw@xxxxxxxxxxxxx>; 
program-l@xxxxxxxxxxxxx; Dante Gagne (danteg) <dmarc-noreply@xxxxxxxxxxxxx>; 
Devendar Reddy A <dreddy@xxxxxxxxxxxxx>
Subject: [program-l] Re: [EXTERNAL] Re: Visual Studio WinForms Designer with 
High DPI

After magnifying to 500% I was able to see when the arrow became a finger 
pointer and I was able to make VS restart. Yes, that does work and the banner 
says that the automatic scaling is turned off.
It would be nice if you could reach that golden bar via the keyboard somehow. 
Perhaps as the first tab index`?


Regards

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@xxxxxxxxxx
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmawingu.se%2F&amp;data=04%7C01%7CDanteG%40microsoft.com%7C6943ebb5d0f34eabc7ff08d9d501de3d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637775027042692982%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=N5Cv1gSAaPZoWhTIIfnBWzzi%2BGnLRqQjHaS3BNmnW7Y%3D&amp;reserved=0

Den 2022-01-04 kl. 22:31, skrev Merrie McGaw (SHE/HER):
There should be an option in that Gold Bar to restart VS in 100% scaling. Is 
that also not working for you?


-----Original Message-----
From: Karl-Otto Rosenqvist <karl-otto@xxxxxxxxxx>
Sent: Tuesday, January 4, 2022 1:13 PM
To: program-l@xxxxxxxxxxxxx; Dante Gagne (danteg)
<dmarc-noreply@xxxxxxxxxxxxx>; Merrie McGaw (SHE/HER)
<Merrie.McGaw@xxxxxxxxxxxxx>
Subject: [EXTERNAL] Re: [program-l] Visual Studio WinForms Designer
with High DPI

[You don't often get email from karl-otto@xxxxxxxxxx. Learn why this
is important at http://aka.ms/LearnAboutSenderIdentification.]

I just checked the registry file I've imported and yes, it does use
the
64 bit path.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows
NT\CurrentVersion\AppCompatFlags\Layers]
@=""
"C:\\Program Files (x86)\\Microsoft Visual 
Studio\\2017\\Community\\Common7\\IDE\\devenv.exe"="DPIUNAWARE"
"C:\\Program Files (x86)\\Microsoft Visual 
Studio\\2019\\Community\\Common7\\IDE\\devenv.exe"="DPIUNAWARE"
"C:\Program Files\Microsoft Visual
Studio\2022\Community\Common7\IDE\devenv.exe"="DPIUNAWARE"


I imported the keys again and opened a .NET 4.8 solution. When switching to 
the WinForms designer I get the banner at the top that my main display (only 
display) is set to 200%.

Visual Studio wasn't running when I imported the registry keys. The path was 
correct so there have been many reboots since first importing the registry 
keys.

Something seems to hount me on this machine. VS 2022 for Mac won't open my 
Xamarin.Forms and Xamarin.iOS solutions. I've reported that too.


Regards

Karl-Otto

Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
0701- 75 98 56
karl-otto@xxxxxxxxxx
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmawi
ngu.se%2F&amp;data=04%7C01%7CDanteG%40microsoft.com%7C206f5c8de28a4102
17d308d9cfcc2839%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C63776929
8504248539%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzI
iLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=rdndg2giNXuAv4Bi7XWJT
vZG5wKp3GTcTQa%2FN1%2FWNFs%3D&amp;reserved=0

Den 2022-01-04 kl. 21:58, skrev Dante Gagne (danteg):
<<Changing the title to reflect the issue>>

Hey Karl,

I checked with my contact on the shell team and he's informed me that the 
registry key should work with VS2022. I will point out that the entry is 
slightly different with VS 2022 (the first piece of the path is now 
'Program Files' instead of 'Program Files (x86)').

According to Merrie, if you're targeting .NET Framework 4.x, it should work 
automatically. If you're targeting .NET 4/5, you'll need to change the 
DPI... which should work either by manipulating the particular display or 
the registry key workaround.

If you're still running into this, reach out to me directly and we'll see 
if we can figure out what's going wrong.

--D

-----Original Message-----
From: program-l-bounce@xxxxxxxxxxxxx <program-l-bounce@xxxxxxxxxxxxx>
On Behalf Of Karl-Otto Rosenqvist
Sent: Tuesday, January 4, 2022 11:52 AM
To: program-l@xxxxxxxxxxxxx; Dante Gagne (danteg)
<dmarc-noreply@xxxxxxxxxxxxx>; Merrie McGaw (SHE/HER)
<Merrie.McGaw@xxxxxxxxxxxxx>
Subject: [program-l] Re: VisualStudio DotNet6 Inaccessibility Issue

Hi!
Hijacking this thread for a similar question.

The WinForms designer doesn't like HD screens that are set to scale 200% or 
above. In VS 2017 and 2019 I was able to add the registry keys to force VS 
to display at 100% but even after adding the registry key it still says 
that I should restart VS to run at 100% scaling.

The info about the registry keys was found here:
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoc
s
.microsoft.com%2Fen-us%2Fvisualstudio%2Fdesigners%2Fdisable-dpi-aware
n
ess%3Fview%3Dvs-2022&amp;data=04%7C01%7CMerrie.McGaw%40microsoft.com%
7
C0903902c308c458bba9b08d9cfc70ad0%7C72f988bf86f141af91ab2d7cd011db47%
7
C1%7C0%7C637769276568075269%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM
D
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=ILg
A
nc5grd1btWdFZOGwWWBv0W5lniV4DUujZiKLq8I%3D&amp;reserved=0

Why doesn't this work for VS 2022? As a visually impaired user that rely 
mainly on screen reader it doesn't matter that much if fonts are a little 
blurry.

Another solution would be to make the WinForms designer work with HD 
screens so you don't have to jump through hoops to make it work but I 
understand that that would require some work and there are probably better 
issues to focus on.


Kind regards

Karl-Otto


Karl-Otto Rosenqvist
MAWINGU
Orgnr: 750804-3937
+46 (0)701 75 98 56
karl-otto@xxxxxxxxxx

Den 2022-01-04 kl. 19:57, skrev Dante Gagne (danteg):
Slightly editing response from mailto:Merrie.McGaw@xxxxxxxxxxxxx on the ;
.NET team:

The accessibility issues only applies to WinForms Designer for .NET 
projects. The workaround still works. And WPF designer works just fine for 
any version of .NET/.NET Framework. You can modify the project file to 
multi-target for both netfx48 and net64-windows. If net48 is listed first, 
the framework designer will work. So, the line in your proj file will look 
like:

            <TargetFrameworks>net48;net6.0-windows</TargetFrameworks>

As for a fix, We're working on it for an upcoming servicing release and 
will keep you posted. Holidays and surprising security events have 
impacted us.

As for converting wpf or Win-Forms to maui to run on desktop
machines and perhaps phones downline. Honestly, MAUI is going to be
a XAML based authoring - which would be an entirely different design
paradigm from WinForms. You have a tough choice to either make an
easier move to WinForms on .NET 6 but have missing support in the
designer window only (code editing is still fine). Then when you
move to MAUI you'd have the migration challenge of moving to a XAML
based layout paradigm. Alternatively you could migrate to WPF -> .NET 6 -> 
MAUI.
Honestly there is no best answer here. My thought would be that
since you want to have both desktop and phone support it might be
best if you bite the bullet and learn XAML models now and migrate to
WPF at the same time as migrating to .NET 6. WinForms is getting
improvements and updates (especially supporting better
accessibility) but WinForms is not the same design model as what your end 
goals would require.
OliaG would be a great resource to tal
    k
     about the migration path she's seeing her customers use that are in 
similar situations.



From: program-l-bounce@xxxxxxxxxxxxx
<program-l-bounce@xxxxxxxxxxxxx> On Behalf Of Rick USA
Sent: Tuesday, January 4, 2022 9:23 AM
To: program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: VisualStudio DotNet6 Inaccessibility Issue

Thanks Dante:
I had been waiting for several months, most all year, for maui but it was 
pushed back into next year.
Now I have to get moving and wanted to use the new enhanced Jason 
features, and others, of dot net 6.
Thanks for checking with the teams  and supporting the folks on this list 
who rely on accessibility to get the job done.
Richard R. Thomas (Rick USA)
Sent from https://go.microsoft.com/fwlink/?LinkId=550986 for Windows

From: mailto:dmarc-noreply@xxxxxxxxxxxxx
Sen t: Tuesday, January 4, 2022 12:03 PM
To: mailto:program-l@xxxxxxxxxxxxx
Subject: [program-l] Re: VisualStudio DotNet6 Inaccessibility Issue

I'm reaching out to the .NET team and I'll hopefully have some answers for 
you today.

--Dante

From: mailto:program-l-bounce@xxxxxxxxxxxxx
<mailto:program-l-bounce@xxxxxxxxxxxxx> On Behalf Of Rick USA
Sent: Tuesday, January 4, 2022 7:24 AM
To: Program-L@Freelists. Org <mailto:program-l@xxxxxxxxxxxxx>
Subject: [program-l] VisualStudio DotNet6 Inaccessibility Issue

      ;                               I am working on updating large and 
complicated vb dot net (Dot Net 4.7) Desk-Top Win-Forms projects and want 
to use some tools from dot net 6.
Dot Net 6 designers are inaccessible in visual studio 2022.
Any word on when MS will fix this issue?
Also, Would wpf or Win-Forms be a better choice for easier conversion to 
maui to run on desktop machines and perhaps phones downline?
Any other suggestions as to project types toward these purposes?
Again, thanks for any insights and suggestions:
Richard R. Thomas (Rick USA)e.


< p class=MsoNormal>Sent from
https://go.microsoft.com/fw%20link/?LinkId=550986 for Windows

** To leave the list, click on the immediately-following link:- **
[mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If
this link doesn't work then send a message to: **
mailto:program-l-request@xxxxxxxxxxxxx ** and in the Subject line
type
** unsubscribe ** For other list commands such as vacation mode,
click on the ** immediately-following link:- **
[mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a
message, to ** mailto:program-l-request@xxxxxxxxxxxxx with the
Subject:- faq

** To leave the list, click on the immediately-following link:- **
[mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe] ** If
this link doesn't work then send a message to: **
mailto:program-l-request@xxxxxxxxxxxxx ** and in the Subject line
type
** unsubscribe ** For other list commands such as vacation mode,
click on the ** immediately-following link:- **
[mailto:program-l-request@xxxxxxxxxxxxx?subject=faq] ** or send a
message, to ** mailto:program-l-request@xxxxxxxxxxxxx with the
Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq
** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq

Other related posts: