Skip to content

Commit 9c97104

Browse files
committed
Revert "Set autoscale modes to DPI for all forms"
This reverts commit 1bf932e.
1 parent 19ed987 commit 9c97104

11 files changed

Lines changed: 63 additions & 78 deletions

InfoBox.Designer/InformationBoxDesigner.Designer.cs

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InfoBox.Designer/InformationBoxDesigner.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public TextBox TextContent
6666
/// </summary>
6767
public InformationBoxDesigner()
6868
{
69-
this.AutoScaleMode = AutoScaleMode.Dpi;
7069
this.InitializeComponent();
7170

7271
this.LoadIcons();

InfoBox.Designer/Program.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ public static class Program
2020
[STAThread]
2121
public static void Main()
2222
{
23-
#if NET5_0_OR_GREATER
24-
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
25-
#endif
2623
Application.EnableVisualStyles();
2724
Application.SetCompatibleTextRenderingDefault(false);
2825
Application.Run(new InformationBoxDesigner());

InfoBox.Designer/TextEditorForm.Designer.cs

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InfoBox.Designer/TextEditorForm.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,11 @@ public partial class TextEditorForm : Form
1818
private readonly InformationBoxDesigner parentDesigner;
1919
private bool isUpdating = false;
2020

21-
/// <summary>
22-
/// Initializes a new instance of the <see cref="TextEditorForm"/> class.
23-
/// </summary>
24-
private TextEditorForm()
25-
{
26-
this.AutoScaleMode = AutoScaleMode.Dpi;
27-
}
28-
2921
/// <summary>
3022
/// Initializes a new instance of the <see cref="TextEditorForm"/> class.
3123
/// </summary>
3224
/// <param name="parentDesigner">The parent designer form.</param>
33-
public TextEditorForm(InformationBoxDesigner parentDesigner): this()
25+
public TextEditorForm(InformationBoxDesigner parentDesigner)
3426
{
3527
this.parentDesigner = parentDesigner ?? throw new ArgumentNullException(nameof(parentDesigner));
3628
this.InitializeComponent();

InfoBox.Designer/TextEditorForm.resx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3-
<!--
4-
Microsoft ResX Schema
5-
3+
<!--
4+
Microsoft ResX Schema
5+
66
Version 2.0
7-
8-
The primary goals of this format is to allow a simple XML format
9-
that is mostly human readable. The generation and parsing of the
10-
various data types are done through the TypeConverter classes
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
1111
associated with the data types.
12-
12+
1313
Example:
14-
14+
1515
... ado.net/XML headers & schema ...
1616
<resheader name="resmimetype">text/microsoft-resx</resheader>
1717
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
2626
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
2727
<comment>This is a comment</comment>
2828
</data>
29-
30-
There are any number of "resheader" rows that contain simple
29+
30+
There are any number of "resheader" rows that contain simple
3131
name/value pairs.
32-
33-
Each data row contains a name, and value. The row also contains a
34-
type or mimetype. Type corresponds to a .NET class that support
35-
text/value conversion through the TypeConverter architecture.
36-
Classes that don't support this are serialized and stored with the
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
3737
mimetype set.
38-
39-
The mimetype is used for serialized objects, and tells the
40-
ResXResourceReader how to depersist the object. This is currently not
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
4141
extensible. For a given mimetype the value must be set accordingly:
42-
43-
Note - application/x-microsoft.net.object.binary.base64 is the format
44-
that the ResXResourceWriter will generate, however the reader can
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
4545
read any of the formats listed below.
46-
46+
4747
mimetype: application/x-microsoft.net.object.binary.base64
48-
value : The object must be serialized with
48+
value : The object must be serialized with
4949
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
5050
: and then encoded with base64 encoding.
51-
51+
5252
mimetype: application/x-microsoft.net.object.soap.base64
53-
value : The object must be serialized with
53+
value : The object must be serialized with
5454
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
5555
: and then encoded with base64 encoding.
5656
5757
mimetype: application/x-microsoft.net.object.bytearray.base64
58-
value : The object must be serialized into a byte array
58+
value : The object must be serialized into a byte array
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->

InfoBox/Form/InformationBoxForm.Designer.cs

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InfoBox/Form/InformationBoxForm.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,13 +208,6 @@ internal partial class InformationBoxForm : Form
208208

209209
#region Constructors
210210

211-
/// <summary>
212-
/// Initializes a new instance of the <see cref="InformationBoxForm"/>.
213-
/// </summary>
214-
private InformationBoxForm()
215-
{
216-
this.AutoScaleMode = AutoScaleMode.Dpi;
217-
}
218211

219212
/// <summary>
220213
/// Initializes a new instance of the <see cref="InformationBoxForm"/> class using the specified text.
@@ -282,7 +275,7 @@ internal InformationBoxForm(string text,
282275
InformationBoxOpacity opacity = InformationBoxOpacity.NoFade,
283276
Form parent = null,
284277
InformationBoxOrder order = InformationBoxOrder.Default,
285-
InformationBoxSound sound = InformationBoxSound.Default) : this()
278+
InformationBoxSound sound = InformationBoxSound.Default)
286279
{
287280
this.InitializeComponent();
288281

InfoBox/Form/InformationBoxForm.resx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<root>
3-
<!--
4-
Microsoft ResX Schema
5-
3+
<!--
4+
Microsoft ResX Schema
5+
66
Version 2.0
7-
8-
The primary goals of this format is to allow a simple XML format
9-
that is mostly human readable. The generation and parsing of the
10-
various data types are done through the TypeConverter classes
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
1111
associated with the data types.
12-
12+
1313
Example:
14-
14+
1515
... ado.net/XML headers & schema ...
1616
<resheader name="resmimetype">text/microsoft-resx</resheader>
1717
<resheader name="version">2.0</resheader>
@@ -26,36 +26,36 @@
2626
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
2727
<comment>This is a comment</comment>
2828
</data>
29-
30-
There are any number of "resheader" rows that contain simple
29+
30+
There are any number of "resheader" rows that contain simple
3131
name/value pairs.
32-
33-
Each data row contains a name, and value. The row also contains a
34-
type or mimetype. Type corresponds to a .NET class that support
35-
text/value conversion through the TypeConverter architecture.
36-
Classes that don't support this are serialized and stored with the
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
3737
mimetype set.
38-
39-
The mimetype is used for serialized objects, and tells the
40-
ResXResourceReader how to depersist the object. This is currently not
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
4141
extensible. For a given mimetype the value must be set accordingly:
42-
43-
Note - application/x-microsoft.net.object.binary.base64 is the format
44-
that the ResXResourceWriter will generate, however the reader can
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
4545
read any of the formats listed below.
46-
46+
4747
mimetype: application/x-microsoft.net.object.binary.base64
48-
value : The object must be serialized with
48+
value : The object must be serialized with
4949
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
5050
: and then encoded with base64 encoding.
51-
51+
5252
mimetype: application/x-microsoft.net.object.soap.base64
53-
value : The object must be serialized with
53+
value : The object must be serialized with
5454
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
5555
: and then encoded with base64 encoding.
5656
5757
mimetype: application/x-microsoft.net.object.bytearray.base64
58-
value : The object must be serialized into a byte array
58+
value : The object must be serialized into a byte array
5959
: using a System.ComponentModel.TypeConverter
6060
: and then encoded with base64 encoding.
6161
-->

InfoBox/InfoBox.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
<CodeContractsShowSquigglies>True</CodeContractsShowSquigglies>
8686
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
8787
<Prefer32Bit>false</Prefer32Bit>
88-
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
8988
</PropertyGroup>
9089
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
9190
<DebugType>portable</DebugType>
@@ -97,7 +96,6 @@
9796
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
9897
<DebugSymbols>true</DebugSymbols>
9998
<Prefer32Bit>false</Prefer32Bit>
100-
<UseWinFormsOutOfProcDesigner>True</UseWinFormsOutOfProcDesigner>
10199
</PropertyGroup>
102100
<ItemGroup>
103101
<Reference Include="System" />

0 commit comments

Comments
 (0)