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
1
vote
0 answers

WinForm scaling incorrectly for some users

I've written a program that I've used and have tested it on xp, win7 and win 10 with various resolutions. The main form displays correctly with the controls properly spaced as follows: Correctly Scaled Form However, when submitting it for review,…
Tim Fehr
  • 11
  • 5
1
vote
0 answers

How to Auto scale AWS EKS instance based on the kafka queue

I need to Auto scale instance of AWS (kubernates instance) based on the kafka queue through which I'm publishing the messages.
1
vote
0 answers

c# windows forms form is not scaling

I have a window that is not scaling. I have applied the PerMonitorV2 flag, and also I have in the class this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; When I try…
Zakk
  • 758
  • 3
  • 11
  • 20
1
vote
0 answers

MDI Child Form is scaling to the wrong size

I have an old C# winforms project I have support for several years now. In this project there is a main form that is an mdiparent and each other form is a child that fits inside the blank area of the parent. This has never been a problem. Now I am…
novacara
  • 2,207
  • 4
  • 24
  • 34
1
vote
0 answers

Windows Forms Excel Addin VSTO scaling for different DPI

I have a WinForms Excel addin and and it was developed on a Win10 computer with a 1080p monitor with 100% scaling (96 DPI). When I change the scaling to 150% (144DPI) the form controls look mangled. I'd like to set the addin to not be dpiAware but…
tjsmith
  • 729
  • 7
  • 21
1
vote
0 answers

VB.NET Form/Control location issue

Running into a strange issue. I don't recall this with VB6, but there is apparently a scaling setting (none, Font, Dpi and Inherit) that sees to be controlling how I move controls at runtime versus where they are at design time. For example. I have…
FNDevCJ
  • 137
  • 4
  • 18
1
vote
1 answer

Winforms Auto-scaling with Localization

I'm having significant issues getting Winforms (C#) auto-scaling working correctly. First of all, it doesn't seem to even do anything across DPIs. When I create a simple application, all of the controls appear the same size on 100% and 125% DPI,…
AStupidNoob
  • 1,980
  • 3
  • 23
  • 35
1
vote
1 answer

AutoScaleMode.Inherit does not inherit

I have a user control contained in a tabpage. The Form has set AutoScaleMode = AutoScaleMode.Font and the UserControl has set AutoScaleMode.Inherit. Now when I enlarge the font size of the form then the font is enlarged in the user control too, but…
codymanix
  • 28,510
  • 21
  • 92
  • 151
0
votes
0 answers

AutoScaleMode - it scales components but not the form itself

I moved an older application from one computer to a new one, and boom - scaling problems. This one as font size 125%, and it causes my applications components to scale to 125% but the form does not scale, meaning that my components are out of…
sonnich
  • 151
  • 2
  • 11
0
votes
0 answers

Autoscale size of multiple components React

how can I autoscale all these react components? depending on the screen size? Code: import { useEffect, useRef, useState } from 'react'; import { useGameContextUpdate } from '../../contexts/GameContext'; import { useHistory, useParams } from…
riki
  • 1,502
  • 5
  • 17
  • 45
0
votes
1 answer

Prometheus metrics not generated

I am working with this example to make my NodeJs application expose Prometheus metrics. When I access the /metrics endpoint, I don't see output. I am new to Prometheus or for that matter custom metrics in general. Here is my attempt. const express =…
cogitoergosum
  • 2,309
  • 4
  • 38
  • 62
0
votes
1 answer

Cosmos Javascript API for creating collection with Autoscale

I am using @azure/cosmos with version 3.9.5 for creating Container and collection in Cosmos DB. I am trying to create collection with maxThroughput parameter so that auto scaling will be…
0
votes
1 answer

Accessing replica set information from within the pod

I want to access the number of replicas and also the current replica id for a given pod, from inside the pod itself. For example, if there are 3 replicas of any given pod, say foo_A, foo_B and foo_C, created in that specific order, is it possible to…
0
votes
0 answers

AutoScaleMode being ignored

I'm writing a WinForms C# application on a 4K laptop in Visual Studio Community 2017. By default I have my Windows 10 Pro scaled to 150%. I have AutoScaleMode = none on every form and every user control. I run my application and yet it still is…
user3147973
  • 426
  • 2
  • 4
  • 18
0
votes
1 answer

Can some one explain to me why the behavior of this ActionScript code is auto scale?

I'm new to AS3 and I'm doing some custom video player video project for AIR. While I was studying the simple examples (non-StageVideo) on how to play videos, I've encountered a unique situation where I got an awesome auto-scaling (stretch-to-fit) to…
MrHuggies
  • 181
  • 1
  • 2
  • 8