Small fix.

This commit is contained in:
Andrea Santaniello 2024-11-04 19:13:47 +01:00
parent a06e09e997
commit 9d78d50df3

View File

@ -60,23 +60,21 @@ namespace RadioControllerApp
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormRadio)); this.AutoScaleMode = AutoScaleMode.Dpi; // Enable DPI scaling
SuspendLayout();
// // Form properties
// FormRadio this.Text = "Radio Controller";
// this.Size = new System.Drawing.Size(800, 700);
AutoScaleDimensions = new SizeF(144F, 144F); this.MinimumSize = new System.Drawing.Size(600, 600);
AutoScaleMode = AutoScaleMode.Dpi; this.FormClosing += FormRadio_FormClosing;
ClientSize = new Size(778, 644);
Icon = (Icon)resources.GetObject("$this.Icon"); // Enable KeyPreview to capture key events
KeyPreview = true; this.KeyPreview = true;
MinimumSize = new Size(600, 600); this.KeyDown += FormRadio_KeyDown;
Name = "FormRadio"; this.KeyUp += FormRadio_KeyUp;
Text = "Radio Controller";
FormClosing += FormRadio_FormClosing; // Initialize controls
KeyDown += FormRadio_KeyDown; InitializeControls();
KeyUp += FormRadio_KeyUp;
ResumeLayout(false);
} }
private void InitializeControls() private void InitializeControls()