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

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

<<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%2Fdocs.microsoft.com%2Fen-us%2Fvisualstudio%2Fdesigners%2Fdisable-dpi-awareness%3Fview%3Dvs-2022&amp;data=04%7C01%7CDanteG%40microsoft.com%7Cd740782027c54e7a39bf08d9cfbba818%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637769227341363987%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=H6H4u6LiCYu9N5b%2Bf0mtwhiaKi21L7uzJo4F7c%2Fm9fw%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

Other related posts: