Questions tagged [autoscalemode]

The ContainerControl class and classes derived from it, such as Form, can automatically resize themselves and their contents according to either the current system font or the resolution of the display, measured in dots per inch (DPI). The AutoScaleMode enumeration defines the automatic scaling modes supported by these classes and their derived types. A control's current mode can be accessed through its ContainerControl.AutoScaleMode property.

In the .NET Framework versions 1.0 and 1.1, automatic scaling was supported using a simpler mechanism that always relied on the current system font. This mechanism is now obsolete but still supported for backward compatibility.

You can obtain the older scaling behavior by setting the AutoScale property of the containing Form to true, which will also implicitly set the ContainerControl.AutoScaleMode property to None. Conversely, setting the ContainerControl.AutoScaleMode property of a form will set AutoScale to false, enabling the newer scaling mechanism introduced with the .NET Framework version 2.0.

Different types of automatic scaling modes supported by Windows Forms.

Namespace: System.Windows.Forms

Assembly: System.Windows.Forms (in System.Windows.Forms.dll)

Syntax

 public enum AutoScaleMode

Reference:

AutoScaleMode

42 questions
5
votes
1 answer

GetClientRect returns scaled dimensions?

I'm calling GetClientRect via pinvoke in C# to get dimensions of a panel (on WindowsForm) I'm using as DirectX render target area. I would've thought that WinAPI gives me the unscaled (i.e. returned values should be the same regardless of Windows…
Zach Saw
  • 4,308
  • 3
  • 33
  • 49
5
votes
3 answers

AutoScaling WinForm Display (Small, Medium)

First and foremost, please forgive me but my screenshots are in French due to my Windows installation at work. It is still very easy to understand though. I'll include screenshots to make it more visually appealing. Here's some background…
Alex
  • 4,821
  • 16
  • 65
  • 106
3
votes
3 answers

WPF high dpi issues

I created a simple web browser WPF test application with pictures and text within a canvas, with windows set at 96dpi. Then I switched to 120 dpi and :-((( Display is messy, image size changed and part of the canvas is out of view... When I used…
Didier Levy
  • 3,393
  • 9
  • 35
  • 57
3
votes
3 answers

How does Mono's WinForms determine the system font size?

I wrote a C# application for Linux that is compiled by mono (gmcs) and uses the WinForms 2.0 library render a user interface. My application looks fine on my computer, but one of my customers is a using a computer (a Fedora/OLPC) with a large font…
David Grayson
  • 84,103
  • 24
  • 152
  • 189
3
votes
2 answers

Visual Studio and DPI issue

I am developing a Windows Forms application using VS2008 on Windows Vista. I tried to run my application on Windows XP the other day, and everything on GUI was messed up. I realized that I developed the application using 120 Dpi setting on Windows…
Mert Sevinc
  • 929
  • 1
  • 8
  • 25
3
votes
2 answers

Force .NetCF 1.0 Scaling model to .NetCF 2.0 application

I have an large application developed in .Net Compact Framework 1.0 that has been developed over the last 9 years with large amount of forms and custom controls. The application is designed for 240x320 screens. It scales good to a 480x640 screen…
Kishore A
  • 1,293
  • 3
  • 16
  • 21
2
votes
1 answer

Plotly-Dash stock app in python, with clientside callback (yaxis autoscale on xaxis zoom)

I'm creating a simple stock chart app in dash-plotly (python) whith an xaxis slider. When sliding the xaxis, I want the yaxis to dynamically rescale to the view. I think I have managed to get the callback function to trigger when sliding the xaxis…
Kristian K
  • 491
  • 5
  • 11
2
votes
0 answers

Problem controlling distance between controls in winform

I am creating an add-in for Excel that features a taskpane that is created at runtime (winforms). The taskpane is fitted with a scrollable panel, which again is fitted with labels, textboxes, groupboxes and buttons. Everything looks great when used…
STHOH
  • 261
  • 1
  • 12
2
votes
0 answers

Azure autoscale on app service does not scale back DOWN on schedule

I have an Azure AppServicePlan and have enabled Autoscale based on a schedule. The default number of servers is always 1. During weekdays it should scale up at 12:50pm to 2. Then at 4pm it should scale back DOWN to 1. It always scales up correctly,…
Rodney
  • 5,417
  • 7
  • 54
  • 98
2
votes
0 answers

Is there a way to prevent from Windows AutoScale my forms?

One of my forms takes screenshot of desktop and uses it as form background for drawing on it. But when the Windows setting "Desktop/Screen resolution/Make text and other items larger or smaller" is greater than 100% the Screen.Bounds is smaller then…
YAts
  • 21
  • 2
2
votes
2 answers

AutoScaleMode.Font and Dynamically added controls

I've been having some trouble scaling controls in my application properly with the form font size. The problem is that the form dynamically adds controls in response to user actions. Any controls that are on the form when the font size is initially…
Toji
  • 33,927
  • 22
  • 105
  • 115
2
votes
1 answer

Amazon autoscaling scale-down instance

I am learning and setting up auoscale configuration for our production application. I want to know while setting scale-down which instance id to use. e.g. my configuration uses maximum number of instances as 3. I can put scale-up policy on instance…
Arvind
  • 75
  • 6
1
vote
1 answer

Automatically restart ONE single instance when CPU hits 90% on Azure App Autoscale and load balance?

I've been having issues with Azure App Autoscale. The main instance (ends with YX) always gets overloaded no matter how many other instances I add. When the app's average CPU reaches 60%, I add one more instance. When the average response time gets…
default
  • 551
  • 8
  • 16
1
vote
0 answers

Autoscaling y-axis according to x-range slider in plotly

I am using plotly for plotting the time-series data where x-axis representing date and y axis some numbers and I've created a slider for selecting date ranges, I want to auto scale the values of y-axis according to the selected date range. How can I…
1
vote
0 answers

Winforms appearance at 100%,125%,150% Windows scaling modes, and alleviating need to constantly edit Designer.cs class every time I update the GUI

I'm developing in Winforms with a .NET 4 profile in Visual Studio 2010 at Windows' 100% scaling (96dpi) on Windows 10. As per the advice from this highly rated answer, I set dpiAware to true in the app.manifest file, set the AutoScaleMode of the…
Dan W
  • 3,520
  • 7
  • 42
  • 69
1
2 3