-
Dec 13th, 2015, 04:18 PM
#1
Thread Starter
Hyperactive Member
-
Dec 13th, 2015, 06:04 PM
#2
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Try playing with the AutoScale and AutoScaleMode properties of the form.
-
Dec 13th, 2015, 07:09 PM
#3
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
In particular, follow directions like this, though there's something else in App.Config that may help.
WinForms sometimes doesn't work well in high-DPI scenarios, but we can't blame it, it's based on 30-year-old tech and a world where 640x480 was only used by Hollywood professionals.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Dec 13th, 2015, 11:04 PM
#4
Thread Starter
Hyperactive Member
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Appreciate your comments...will definitely dig deeper into this. I'm not the only one struggling with this - see this link (and its comments) for a pretty good summary of the issue:
http://www.hanselman.com/blog/Living...BePainful.aspx
Seems some who have bought hi-res laptops are rethinking that decision .
Not planning to dump my new XPS 13 laptop.
Is upgrading to VS2015 a part of the solution?
Last edited by Mark@SF; Dec 13th, 2015 at 11:11 PM.
-
Dec 13th, 2015, 11:55 PM
#5
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Originally Posted by Mark@SF
Is upgrading to VS2015 a part of the solution?
Windows Forms is still Windows Forms. There have been no changes to WinForms that I'm aware of for quite some time.
-
Dec 14th, 2015, 08:53 AM
#6
Thread Starter
Hyperactive Member
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Sitten Spynne -
Originally Posted by Sitten Spynne
...though there's something else in App.Config that may help.
Can you elaborate a bit more on this point?
-
Dec 14th, 2015, 08:59 AM
#7
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Originally Posted by Mark@SF
Appreciate your comments...will definitely dig deeper into this. I'm not the only one struggling with this - see this link (and its comments) for a pretty good summary of the issue:
http://www.hanselman.com/blog/Living...BePainful.aspx
Seems some who have bought hi-res laptops are rethinking that decision .
This is a chronic problem in the Windows ecosystem: MS developers like for something to be at least 20 years old before they start considering it. See: all the .NET code on this forum using Call and Mid$ like it's 1999. (Though in Call's case it's more like 1989.)
MS started telling developers to support high DPI back in 2006 or so, even earlier if you count the WPF betas, when it was 'Avalon'. 10 years later, finding a VB developer that can write Hello World in WPF is like finding a rude Canadian.
Not planning to dump my new XPS 13 laptop.
Is upgrading to VS2015 a part of the solution?
Not really. You have to read the documentation and fiddle with your AutoScaling properties a lot. When I read the MSDN docs, they seemed apologetic, almost as if MS was admitting the solution wasn't perfect and only worked in certain scenarios. Another solution is to manually check the DPI yourself, though what I saw in another thread related to this is the scaling is happening beyond your code's control, and if you ask Windows for the DPI it happily pretends the answer is 96 when it's really more like 185+. What I mean to say is there's some mechanism outside of Windows Forms' control that's trying to help, and it makes things worse.
The easiest solution is to learn WPF and start writing apps that way. "Easy" is a tricky word there, but I believe in 10 years the world of UI design is going to look more like WPF than Windows Forms, so every day you put it off is a sadder tomorrow. (Already Android, Windows Phone, and even iOS are adopting the same kind of structures. Though iOS/Mac OS is kind of thumbing its nose because Objective-C and Interface Builder had some of these features in the late 80s.)
I'll see if I can find the stuff about the App.Config settings when I get into work. Finding threads on this forum's tough.
*edit*
Here it is, faster than I thought. TnTinMN wrote a very detailed explanation. It looks like the gist is you tell Windows Forms to pound sand and do the work it poorly does by yourself, correctly.
Last edited by Sitten Spynne; Dec 14th, 2015 at 09:05 AM.
This answer is wrong. You should be using TableAdapter and Dictionaries instead.
-
Dec 21st, 2015, 01:07 PM
#8
Thread Starter
Hyperactive Member
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
See also my related post http://www.vbforums.com/showthread.p...2015-Community for additional information and details on this issue. I've resolved the problem that the application will not compile (Debug), but still am having trouble getting it to compile (Release). In addition, I'm looking for help with a couple of VS2015 messages.
-
Dec 21st, 2015, 01:36 PM
#9
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Have you tried using the TableLayoutPanel control to handle the placement of all your controls?
-
Dec 21st, 2015, 02:44 PM
#10
Thread Starter
Hyperactive Member
Re: Form and its controls are not sizing correctly w/Win10 and Dell XPS 13 QHD displa
Originally Posted by dday9
Have you tried using the TableLayoutPanel control to handle the placement of all your controls?
I think the problem was not the QHD+ display resolution, but instead it was having VS2010-to-VS2015 migration issues. For example, the PowerPacks.Vs project reference was for VS2010 and needed to be deleted and the VS2015 reference added. The above referenced link to my other VBForums post has more details.
Thanks for responding and offering helpful advice! Always appreciate the experts on this forum.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|