The forms are cut for me using high resolution on WinForm
-
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
-
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
If the size of the "controls" (on the forms) was fixed, "auto sizing" only the form makes no difference; everything has to be able to resize itself based on its container.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
If the size of the "controls" (on the forms) was fixed, "auto sizing" only the form makes no difference; everything has to be able to resize itself based on its container.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
Yep, Win10 is a pile of crap. If I size everything to 100%, it's so miniscule that it's totally unreadable (for me, in my more mature years). So I set magnification to 125%; most text is now readable, but some older apps remain unaffected. In MS Office most texts are fine, but the icons are absolutely tiny; fortunately I can generally remember the sequence, but otherwise I couldn't use Office apps. Most pop-up boxes from Windows are OK, but some - core Windows pop-ups - are the right size but their controls are misplaced, sometimes outside the boundary of the form. When this happens with an
OK
orCANCEL
button the popup becomes unusable and I have to change the default Windows setting temporarily. Then there's a whole raft of applications - both Microsoft and 3rd party - where the text is displayed fuzzy and makes my eyes hurt to read it. All this, and it seems that 125% is the default for Win10 on my screen size / resolution. Windows 3.1 was better than this! -
Thanks for the answer, so if I understood correctly, I need all the controls to be AutoSize = true ?
You prototype to see what works and what doesn't ... for "your" app. I'm not going to tell you to change "everything" to autosize. Sometimes you want something fixed size so you don't get a lot of empty space. IMO, the "secret" to Windows Forms "fluid" design is to make "everything" "dockable"; that's the basis for fluid design in XAML (wpf and uwp). Most Windows Forms (designers) use absolute positioning by default.
It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food
-
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
I had similar problems until I set AutoScaleMode to Font. However, I have my 4k laptop screen set to 1920x1080 as well as 150% scaling ... I have vision problems.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
I had similar problems until I set AutoScaleMode to Font. However, I have my 4k laptop screen set to 1920x1080 as well as 150% scaling ... I have vision problems.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
I also have a laptop with 4K screen (3840X2160) 220% scaling and I also changed AutoScaleMode to Font. and still cut the screens in the my program
I think you can focus this discussion more by adding to your original post specific details: for example, you create a new WinForm project, size the main form to 800x600, set the StartPosition to 'CenterScreen. Drop Labels in each corner of the Form: then, run the project, and describe what you observe. You might also put this code in the main form Load event:
Rectangle r1 = Screen.PrimaryScreen.Bounds;
Rectangle r2 = this.Bounds;
Rectangle r3 = this.ClientRectangle;
Rectangle r4 = this.DisplayRectangle;Console.WriteLine($"screen {r1}\nform bounds {r2}\nform displayrect {r3}\nform clientrect {r2}");
And, try varying the AutoScaleMode ... the goal being to identify the visually unexpected.
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
-
I got a new laptop with very high resolution. I increased the size text, apps and other to 150% i work on WinForm program using Visual-Studio 2019. All the forms in my program are cut and everything goes wrong on the screen. i try this: app.manifest app.config i work on .NET Framework 4.7.2 i also try this: https://docs.microsoft.com/en-us/dotnet/desktop/winforms/high-dpi-support-in-windows-forms?view=netframeworkdesktop-4.8 and also this on the main of every form: (Each time something different) this.AutoScaleMode = AutoScaleMode.Font; this.AutoScaleMode = AutoScaleMode.Dpi; this.AutoScaleMode = AutoScaleMode.None; I have already tried everything .... and nothing helps. any idea ? thanks
I think you can focus this discussion more by adding to your original post specific details: for example, you create a new WinForm project, size the main form to 800x600, set the StartPosition to 'CenterScreen. Drop Labels in each corner of the Form: then, run the project, and describe what you observe. You might also put this code in the main form Load event:
Rectangle r1 = Screen.PrimaryScreen.Bounds;
Rectangle r2 = this.Bounds;
Rectangle r3 = this.ClientRectangle;
Rectangle r4 = this.DisplayRectangle;Console.WriteLine($"screen {r1}\nform bounds {r2}\nform displayrect {r3}\nform clientrect {r2}");
And, try varying the AutoScaleMode ... the goal being to identify the visually unexpected more clearly. Hope it helps !
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali