From 902c1222fe3ab22ea98648da81ae85d5a826e0f0 Mon Sep 17 00:00:00 2001 From: Mark Webb Date: Thu, 21 Dec 2023 12:11:42 +0000 Subject: [PATCH] Add option to start the vm in full screen mode --- 86BoxManager/dlgSettings.Designer.cs | 197 +++++++++++++-------------- 86BoxManager/dlgSettings.cs | 8 +- 86BoxManager/frmMain.cs | 8 ++ 3 files changed, 111 insertions(+), 102 deletions(-) diff --git a/86BoxManager/dlgSettings.Designer.cs b/86BoxManager/dlgSettings.Designer.cs index 87d932b..13cf617 100644 --- a/86BoxManager/dlgSettings.Designer.cs +++ b/86BoxManager/dlgSettings.Designer.cs @@ -68,6 +68,7 @@ private void InitializeComponent() this.lblDesc = new System.Windows.Forms.Label(); this.lblTitle = new System.Windows.Forms.Label(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.cbxStartVMFullscreen = new System.Windows.Forms.CheckBox(); this.pnlBottom.SuspendLayout(); this.tbcSettings.SuspendLayout(); this.tabGeneral.SuspendLayout(); @@ -85,10 +86,10 @@ private void InitializeComponent() this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnApply.Enabled = false; this.btnApply.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnApply.Location = new System.Drawing.Point(791, 14); + this.btnApply.Location = new System.Drawing.Point(633, 11); this.btnApply.Margin = new System.Windows.Forms.Padding(2); this.btnApply.Name = "btnApply"; - this.btnApply.Size = new System.Drawing.Size(81, 38); + this.btnApply.Size = new System.Drawing.Size(65, 30); this.btnApply.TabIndex = 17; this.btnApply.Text = "Apply"; this.btnApply.UseVisualStyleBackColor = true; @@ -99,10 +100,10 @@ private void InitializeComponent() this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnCancel.Location = new System.Drawing.Point(705, 14); + this.btnCancel.Location = new System.Drawing.Point(564, 11); this.btnCancel.Margin = new System.Windows.Forms.Padding(2); this.btnCancel.Name = "btnCancel"; - this.btnCancel.Size = new System.Drawing.Size(81, 38); + this.btnCancel.Size = new System.Drawing.Size(65, 30); this.btnCancel.TabIndex = 16; this.btnCancel.Text = "Cancel"; this.btnCancel.UseVisualStyleBackColor = true; @@ -113,10 +114,10 @@ private void InitializeComponent() this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK; this.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnOK.Location = new System.Drawing.Point(619, 14); + this.btnOK.Location = new System.Drawing.Point(495, 11); this.btnOK.Margin = new System.Windows.Forms.Padding(2); this.btnOK.Name = "btnOK"; - this.btnOK.Size = new System.Drawing.Size(81, 38); + this.btnOK.Size = new System.Drawing.Size(65, 30); this.btnOK.TabIndex = 15; this.btnOK.Text = "OK"; this.btnOK.UseVisualStyleBackColor = true; @@ -126,10 +127,10 @@ private void InitializeComponent() // this.cbxShowConsole.AutoSize = true; this.cbxShowConsole.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxShowConsole.Location = new System.Drawing.Point(356, 29); + this.cbxShowConsole.Location = new System.Drawing.Point(285, 23); this.cbxShowConsole.Margin = new System.Windows.Forms.Padding(2); this.cbxShowConsole.Name = "cbxShowConsole"; - this.cbxShowConsole.Size = new System.Drawing.Size(269, 28); + this.cbxShowConsole.Size = new System.Drawing.Size(217, 24); this.cbxShowConsole.TabIndex = 13; this.cbxShowConsole.Text = "Enable 86Box console window"; this.cbxShowConsole.UseVisualStyleBackColor = true; @@ -139,10 +140,10 @@ private void InitializeComponent() // this.btnDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btnDefaults.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnDefaults.Location = new System.Drawing.Point(14, 14); + this.btnDefaults.Location = new System.Drawing.Point(11, 11); this.btnDefaults.Margin = new System.Windows.Forms.Padding(2); this.btnDefaults.Name = "btnDefaults"; - this.btnDefaults.Size = new System.Drawing.Size(81, 38); + this.btnDefaults.Size = new System.Drawing.Size(65, 30); this.btnDefaults.TabIndex = 14; this.btnDefaults.Text = "Defaults"; this.btnDefaults.UseVisualStyleBackColor = true; @@ -156,10 +157,10 @@ private void InitializeComponent() this.pnlBottom.Controls.Add(this.btnCancel); this.pnlBottom.Controls.Add(this.btnOK); this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlBottom.Location = new System.Drawing.Point(0, 355); + this.pnlBottom.Location = new System.Drawing.Point(0, 284); this.pnlBottom.Margin = new System.Windows.Forms.Padding(2); this.pnlBottom.Name = "pnlBottom"; - this.pnlBottom.Size = new System.Drawing.Size(886, 65); + this.pnlBottom.Size = new System.Drawing.Size(709, 52); this.pnlBottom.TabIndex = 14; // // tbcSettings @@ -167,22 +168,20 @@ private void InitializeComponent() this.tbcSettings.Controls.Add(this.tabGeneral); this.tbcSettings.Controls.Add(this.tabAdvanced); this.tbcSettings.Controls.Add(this.tabAbout); - this.tbcSettings.Location = new System.Drawing.Point(15, 15); - this.tbcSettings.Margin = new System.Windows.Forms.Padding(4); + this.tbcSettings.Location = new System.Drawing.Point(12, 12); this.tbcSettings.Name = "tbcSettings"; this.tbcSettings.SelectedIndex = 0; - this.tbcSettings.Size = new System.Drawing.Size(861, 329); + this.tbcSettings.Size = new System.Drawing.Size(689, 263); this.tbcSettings.TabIndex = 0; // // tabGeneral // this.tabGeneral.Controls.Add(this.gbxBehaviour); this.tabGeneral.Controls.Add(this.gbxPaths); - this.tabGeneral.Location = new System.Drawing.Point(4, 32); - this.tabGeneral.Margin = new System.Windows.Forms.Padding(4); + this.tabGeneral.Location = new System.Drawing.Point(4, 26); this.tabGeneral.Name = "tabGeneral"; - this.tabGeneral.Padding = new System.Windows.Forms.Padding(4); - this.tabGeneral.Size = new System.Drawing.Size(853, 293); + this.tabGeneral.Padding = new System.Windows.Forms.Padding(3); + this.tabGeneral.Size = new System.Drawing.Size(681, 233); this.tabGeneral.TabIndex = 0; this.tabGeneral.Text = "General"; this.tabGeneral.UseVisualStyleBackColor = true; @@ -192,11 +191,9 @@ private void InitializeComponent() this.gbxBehaviour.Controls.Add(this.cbxMinimizeTray); this.gbxBehaviour.Controls.Add(this.cbxCloseTray); this.gbxBehaviour.Controls.Add(this.cbxMinimize); - this.gbxBehaviour.Location = new System.Drawing.Point(8, 176); - this.gbxBehaviour.Margin = new System.Windows.Forms.Padding(4); + this.gbxBehaviour.Location = new System.Drawing.Point(6, 141); this.gbxBehaviour.Name = "gbxBehaviour"; - this.gbxBehaviour.Padding = new System.Windows.Forms.Padding(4); - this.gbxBehaviour.Size = new System.Drawing.Size(836, 108); + this.gbxBehaviour.Size = new System.Drawing.Size(669, 86); this.gbxBehaviour.TabIndex = 6; this.gbxBehaviour.TabStop = false; this.gbxBehaviour.Text = "Behaviour"; @@ -205,10 +202,10 @@ private void InitializeComponent() // this.cbxMinimizeTray.AutoSize = true; this.cbxMinimizeTray.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxMinimizeTray.Location = new System.Drawing.Point(11, 29); + this.cbxMinimizeTray.Location = new System.Drawing.Point(9, 23); this.cbxMinimizeTray.Margin = new System.Windows.Forms.Padding(2); this.cbxMinimizeTray.Name = "cbxMinimizeTray"; - this.cbxMinimizeTray.Size = new System.Drawing.Size(326, 28); + this.cbxMinimizeTray.Size = new System.Drawing.Size(264, 24); this.cbxMinimizeTray.TabIndex = 5; this.cbxMinimizeTray.Text = "Minimize 86Box Manager to tray icon"; this.cbxMinimizeTray.UseVisualStyleBackColor = true; @@ -218,10 +215,10 @@ private void InitializeComponent() // this.cbxCloseTray.AutoSize = true; this.cbxCloseTray.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxCloseTray.Location = new System.Drawing.Point(421, 29); + this.cbxCloseTray.Location = new System.Drawing.Point(337, 23); this.cbxCloseTray.Margin = new System.Windows.Forms.Padding(2); this.cbxCloseTray.Name = "cbxCloseTray"; - this.cbxCloseTray.Size = new System.Drawing.Size(298, 28); + this.cbxCloseTray.Size = new System.Drawing.Size(242, 24); this.cbxCloseTray.TabIndex = 6; this.cbxCloseTray.Text = "Close 86Box Manager to tray icon"; this.cbxCloseTray.UseVisualStyleBackColor = true; @@ -231,10 +228,10 @@ private void InitializeComponent() // this.cbxMinimize.AutoSize = true; this.cbxMinimize.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxMinimize.Location = new System.Drawing.Point(11, 64); + this.cbxMinimize.Location = new System.Drawing.Point(9, 51); this.cbxMinimize.Margin = new System.Windows.Forms.Padding(2); this.cbxMinimize.Name = "cbxMinimize"; - this.cbxMinimize.Size = new System.Drawing.Size(399, 28); + this.cbxMinimize.Size = new System.Drawing.Size(324, 24); this.cbxMinimize.TabIndex = 7; this.cbxMinimize.Text = "Minimize 86Box Manager when a VM is started"; this.cbxMinimize.UseVisualStyleBackColor = true; @@ -250,11 +247,9 @@ private void InitializeComponent() this.gbxPaths.Controls.Add(this.btnBrowse2); this.gbxPaths.Controls.Add(this.lblEXEdir); this.gbxPaths.Controls.Add(this.btnBrowse1); - this.gbxPaths.Location = new System.Drawing.Point(8, 8); - this.gbxPaths.Margin = new System.Windows.Forms.Padding(4); + this.gbxPaths.Location = new System.Drawing.Point(6, 6); this.gbxPaths.Name = "gbxPaths"; - this.gbxPaths.Padding = new System.Windows.Forms.Padding(4); - this.gbxPaths.Size = new System.Drawing.Size(836, 161); + this.gbxPaths.Size = new System.Drawing.Size(669, 129); this.gbxPaths.TabIndex = 5; this.gbxPaths.TabStop = false; this.gbxPaths.Text = "Paths"; @@ -264,58 +259,58 @@ private void InitializeComponent() this.lbl86BoxVer1.AutoSize = true; this.lbl86BoxVer1.Font = new System.Drawing.Font("Segoe UI Semibold", 10F, System.Drawing.FontStyle.Bold); this.lbl86BoxVer1.ForeColor = System.Drawing.SystemColors.ControlText; - this.lbl86BoxVer1.Location = new System.Drawing.Point(125, 74); + this.lbl86BoxVer1.Location = new System.Drawing.Point(100, 59); this.lbl86BoxVer1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lbl86BoxVer1.Name = "lbl86BoxVer1"; - this.lbl86BoxVer1.Size = new System.Drawing.Size(207, 23); + this.lbl86BoxVer1.Size = new System.Drawing.Size(170, 19); this.lbl86BoxVer1.TabIndex = 6; this.lbl86BoxVer1.Text = ""; // // lbl86BoxVer // this.lbl86BoxVer.AutoSize = true; - this.lbl86BoxVer.Location = new System.Drawing.Point(6, 74); + this.lbl86BoxVer.Location = new System.Drawing.Point(5, 59); this.lbl86BoxVer.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lbl86BoxVer.Name = "lbl86BoxVer"; - this.lbl86BoxVer.Size = new System.Drawing.Size(119, 23); + this.lbl86BoxVer.Size = new System.Drawing.Size(98, 19); this.lbl86BoxVer.TabIndex = 5; this.lbl86BoxVer.Text = "86Box version:"; // // lblCFGdir // this.lblCFGdir.AutoSize = true; - this.lblCFGdir.Location = new System.Drawing.Point(6, 116); + this.lblCFGdir.Location = new System.Drawing.Point(5, 93); this.lblCFGdir.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblCFGdir.Name = "lblCFGdir"; - this.lblCFGdir.Size = new System.Drawing.Size(80, 23); + this.lblCFGdir.Size = new System.Drawing.Size(66, 19); this.lblCFGdir.TabIndex = 4; this.lblCFGdir.Text = "VM path:"; // // txtCFGdir // - this.txtCFGdir.Location = new System.Drawing.Point(116, 112); + this.txtCFGdir.Location = new System.Drawing.Point(93, 90); this.txtCFGdir.Margin = new System.Windows.Forms.Padding(2); this.txtCFGdir.Name = "txtCFGdir"; - this.txtCFGdir.Size = new System.Drawing.Size(620, 30); + this.txtCFGdir.Size = new System.Drawing.Size(497, 25); this.txtCFGdir.TabIndex = 3; this.txtCFGdir.TextChanged += new System.EventHandler(this.txt_TextChanged); // // txtEXEdir // - this.txtEXEdir.Location = new System.Drawing.Point(116, 29); + this.txtEXEdir.Location = new System.Drawing.Point(93, 23); this.txtEXEdir.Margin = new System.Windows.Forms.Padding(2); this.txtEXEdir.Name = "txtEXEdir"; - this.txtEXEdir.Size = new System.Drawing.Size(620, 30); + this.txtEXEdir.Size = new System.Drawing.Size(497, 25); this.txtEXEdir.TabIndex = 1; this.txtEXEdir.TextChanged += new System.EventHandler(this.txt_TextChanged); // // btnBrowse2 // this.btnBrowse2.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnBrowse2.Location = new System.Drawing.Point(742, 109); + this.btnBrowse2.Location = new System.Drawing.Point(594, 87); this.btnBrowse2.Margin = new System.Windows.Forms.Padding(2); this.btnBrowse2.Name = "btnBrowse2"; - this.btnBrowse2.Size = new System.Drawing.Size(88, 38); + this.btnBrowse2.Size = new System.Drawing.Size(70, 30); this.btnBrowse2.TabIndex = 4; this.btnBrowse2.Text = "Browse..."; this.btnBrowse2.UseVisualStyleBackColor = true; @@ -324,10 +319,10 @@ private void InitializeComponent() // lblEXEdir // this.lblEXEdir.AutoSize = true; - this.lblEXEdir.Location = new System.Drawing.Point(6, 32); + this.lblEXEdir.Location = new System.Drawing.Point(5, 26); this.lblEXEdir.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblEXEdir.Name = "lblEXEdir"; - this.lblEXEdir.Size = new System.Drawing.Size(100, 23); + this.lblEXEdir.Size = new System.Drawing.Size(82, 19); this.lblEXEdir.TabIndex = 3; this.lblEXEdir.Text = "86Box path:"; // @@ -335,10 +330,10 @@ private void InitializeComponent() // this.btnBrowse1.FlatStyle = System.Windows.Forms.FlatStyle.System; this.btnBrowse1.Font = new System.Drawing.Font("Segoe UI", 10F); - this.btnBrowse1.Location = new System.Drawing.Point(742, 25); + this.btnBrowse1.Location = new System.Drawing.Point(594, 20); this.btnBrowse1.Margin = new System.Windows.Forms.Padding(2); this.btnBrowse1.Name = "btnBrowse1"; - this.btnBrowse1.Size = new System.Drawing.Size(88, 38); + this.btnBrowse1.Size = new System.Drawing.Size(70, 30); this.btnBrowse1.TabIndex = 2; this.btnBrowse1.Text = "Browse..."; this.btnBrowse1.UseVisualStyleBackColor = true; @@ -348,11 +343,10 @@ private void InitializeComponent() // this.tabAdvanced.Controls.Add(this.gbxLogging); this.tabAdvanced.Controls.Add(this.gbxMisc); - this.tabAdvanced.Location = new System.Drawing.Point(4, 32); - this.tabAdvanced.Margin = new System.Windows.Forms.Padding(4); + this.tabAdvanced.Location = new System.Drawing.Point(4, 26); this.tabAdvanced.Name = "tabAdvanced"; - this.tabAdvanced.Padding = new System.Windows.Forms.Padding(4); - this.tabAdvanced.Size = new System.Drawing.Size(853, 293); + this.tabAdvanced.Padding = new System.Windows.Forms.Padding(3); + this.tabAdvanced.Size = new System.Drawing.Size(681, 233); this.tabAdvanced.TabIndex = 1; this.tabAdvanced.Text = "Advanced"; this.tabAdvanced.UseVisualStyleBackColor = true; @@ -362,11 +356,9 @@ private void InitializeComponent() this.gbxLogging.Controls.Add(this.cbxLogging); this.gbxLogging.Controls.Add(this.txtLogPath); this.gbxLogging.Controls.Add(this.btnBrowse3); - this.gbxLogging.Location = new System.Drawing.Point(8, 8); - this.gbxLogging.Margin = new System.Windows.Forms.Padding(4); + this.gbxLogging.Location = new System.Drawing.Point(6, 6); this.gbxLogging.Name = "gbxLogging"; - this.gbxLogging.Padding = new System.Windows.Forms.Padding(4); - this.gbxLogging.Size = new System.Drawing.Size(836, 116); + this.gbxLogging.Size = new System.Drawing.Size(669, 93); this.gbxLogging.TabIndex = 18; this.gbxLogging.TabStop = false; this.gbxLogging.Text = "Logging"; @@ -375,10 +367,10 @@ private void InitializeComponent() // this.cbxLogging.AutoSize = true; this.cbxLogging.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxLogging.Location = new System.Drawing.Point(11, 29); + this.cbxLogging.Location = new System.Drawing.Point(9, 23); this.cbxLogging.Margin = new System.Windows.Forms.Padding(2); this.cbxLogging.Name = "cbxLogging"; - this.cbxLogging.Size = new System.Drawing.Size(258, 28); + this.cbxLogging.Size = new System.Drawing.Size(207, 24); this.cbxLogging.TabIndex = 9; this.cbxLogging.Text = "Enable 86Box logging to file:"; this.cbxLogging.UseVisualStyleBackColor = true; @@ -386,20 +378,19 @@ private void InitializeComponent() // // txtLogPath // - this.txtLogPath.Location = new System.Drawing.Point(11, 65); - this.txtLogPath.Margin = new System.Windows.Forms.Padding(4); + this.txtLogPath.Location = new System.Drawing.Point(9, 52); this.txtLogPath.Name = "txtLogPath"; - this.txtLogPath.Size = new System.Drawing.Size(724, 30); + this.txtLogPath.Size = new System.Drawing.Size(580, 25); this.txtLogPath.TabIndex = 10; this.txtLogPath.TextChanged += new System.EventHandler(this.txt_TextChanged); // // btnBrowse3 // this.btnBrowse3.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.btnBrowse3.Location = new System.Drawing.Point(742, 61); + this.btnBrowse3.Location = new System.Drawing.Point(594, 49); this.btnBrowse3.Margin = new System.Windows.Forms.Padding(2); this.btnBrowse3.Name = "btnBrowse3"; - this.btnBrowse3.Size = new System.Drawing.Size(88, 38); + this.btnBrowse3.Size = new System.Drawing.Size(70, 30); this.btnBrowse3.TabIndex = 11; this.btnBrowse3.Text = "Browse..."; this.btnBrowse3.UseVisualStyleBackColor = true; @@ -407,13 +398,12 @@ private void InitializeComponent() // // gbxMisc // + this.gbxMisc.Controls.Add(this.cbxStartVMFullscreen); this.gbxMisc.Controls.Add(this.cbxGrid); this.gbxMisc.Controls.Add(this.cbxShowConsole); - this.gbxMisc.Location = new System.Drawing.Point(8, 131); - this.gbxMisc.Margin = new System.Windows.Forms.Padding(4); + this.gbxMisc.Location = new System.Drawing.Point(6, 105); this.gbxMisc.Name = "gbxMisc"; - this.gbxMisc.Padding = new System.Windows.Forms.Padding(4); - this.gbxMisc.Size = new System.Drawing.Size(836, 71); + this.gbxMisc.Size = new System.Drawing.Size(669, 83); this.gbxMisc.TabIndex = 17; this.gbxMisc.TabStop = false; this.gbxMisc.Text = "Miscellaneous"; @@ -422,10 +412,10 @@ private void InitializeComponent() // this.cbxGrid.AutoSize = true; this.cbxGrid.FlatStyle = System.Windows.Forms.FlatStyle.System; - this.cbxGrid.Location = new System.Drawing.Point(11, 29); + this.cbxGrid.Location = new System.Drawing.Point(9, 23); this.cbxGrid.Margin = new System.Windows.Forms.Padding(2); this.cbxGrid.Name = "cbxGrid"; - this.cbxGrid.Size = new System.Drawing.Size(340, 28); + this.cbxGrid.Size = new System.Drawing.Size(272, 24); this.cbxGrid.TabIndex = 12; this.cbxGrid.Text = "Enable grid lines in virtual machines list"; this.cbxGrid.UseVisualStyleBackColor = true; @@ -441,11 +431,10 @@ private void InitializeComponent() this.tabAbout.Controls.Add(this.lblVersion); this.tabAbout.Controls.Add(this.lblDesc); this.tabAbout.Controls.Add(this.lblTitle); - this.tabAbout.Location = new System.Drawing.Point(4, 32); - this.tabAbout.Margin = new System.Windows.Forms.Padding(4); + this.tabAbout.Location = new System.Drawing.Point(4, 26); this.tabAbout.Name = "tabAbout"; - this.tabAbout.Padding = new System.Windows.Forms.Padding(4); - this.tabAbout.Size = new System.Drawing.Size(853, 293); + this.tabAbout.Padding = new System.Windows.Forms.Padding(3); + this.tabAbout.Size = new System.Drawing.Size(681, 233); this.tabAbout.TabIndex = 2; this.tabAbout.Text = "About"; this.tabAbout.UseVisualStyleBackColor = true; @@ -454,10 +443,9 @@ private void InitializeComponent() // this.lnkGithub.AutoSize = true; this.lnkGithub.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lnkGithub.Location = new System.Drawing.Point(19, 250); - this.lnkGithub.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lnkGithub.Location = new System.Drawing.Point(15, 200); this.lnkGithub.Name = "lnkGithub"; - this.lnkGithub.Size = new System.Drawing.Size(328, 23); + this.lnkGithub.Size = new System.Drawing.Size(264, 19); this.lnkGithub.TabIndex = 12; this.lnkGithub.TabStop = true; this.lnkGithub.Text = "https://github.com/86Box/86BoxManager"; @@ -466,10 +454,10 @@ private void InitializeComponent() // imgLogo // this.imgLogo.Image = ((System.Drawing.Image)(resources.GetObject("imgLogo.Image"))); - this.imgLogo.Location = new System.Drawing.Point(23, 19); - this.imgLogo.Margin = new System.Windows.Forms.Padding(4, 2, 4, 2); + this.imgLogo.Location = new System.Drawing.Point(18, 15); + this.imgLogo.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); this.imgLogo.Name = "imgLogo"; - this.imgLogo.Size = new System.Drawing.Size(48, 48); + this.imgLogo.Size = new System.Drawing.Size(38, 38); this.imgLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.imgLogo.TabIndex = 17; this.imgLogo.TabStop = false; @@ -478,10 +466,9 @@ private void InitializeComponent() // this.lblVersion1.AutoSize = true; this.lblVersion1.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lblVersion1.Location = new System.Drawing.Point(86, 104); - this.lblVersion1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblVersion1.Location = new System.Drawing.Point(69, 83); this.lblVersion1.Name = "lblVersion1"; - this.lblVersion1.Size = new System.Drawing.Size(168, 23); + this.lblVersion1.Size = new System.Drawing.Size(137, 19); this.lblVersion1.TabIndex = 16; this.lblVersion1.Text = ""; // @@ -489,10 +476,9 @@ private void InitializeComponent() // this.lnkGithub2.AutoSize = true; this.lnkGithub2.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lnkGithub2.Location = new System.Drawing.Point(19, 221); - this.lnkGithub2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lnkGithub2.Location = new System.Drawing.Point(15, 177); this.lnkGithub2.Name = "lnkGithub2"; - this.lnkGithub2.Size = new System.Drawing.Size(260, 23); + this.lnkGithub2.Size = new System.Drawing.Size(209, 19); this.lnkGithub2.TabIndex = 10; this.lnkGithub2.TabStop = true; this.lnkGithub2.Text = "https://github.com/86Box/86Box"; @@ -502,10 +488,9 @@ private void InitializeComponent() // this.lblCopyright.AutoSize = true; this.lblCopyright.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lblCopyright.Location = new System.Drawing.Point(19, 139); - this.lblCopyright.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblCopyright.Location = new System.Drawing.Point(15, 111); this.lblCopyright.Name = "lblCopyright"; - this.lblCopyright.Size = new System.Drawing.Size(458, 69); + this.lblCopyright.Size = new System.Drawing.Size(368, 57); this.lblCopyright.TabIndex = 15; this.lblCopyright.Text = "Copyright © 2018-2022 David Simunič\r\nLicensed under the MIT license. See the LICE" + "NSE file for\r\nlicense information and AUTHORS for a list of contributors."; @@ -514,10 +499,9 @@ private void InitializeComponent() // this.lblVersion.AutoSize = true; this.lblVersion.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lblVersion.Location = new System.Drawing.Point(19, 104); - this.lblVersion.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblVersion.Location = new System.Drawing.Point(15, 83); this.lblVersion.Name = "lblVersion"; - this.lblVersion.Size = new System.Drawing.Size(70, 23); + this.lblVersion.Size = new System.Drawing.Size(57, 19); this.lblVersion.TabIndex = 14; this.lblVersion.Text = "Version:"; // @@ -525,10 +509,9 @@ private void InitializeComponent() // this.lblDesc.AutoSize = true; this.lblDesc.Font = new System.Drawing.Font("Segoe UI", 10F); - this.lblDesc.Location = new System.Drawing.Point(19, 69); - this.lblDesc.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblDesc.Location = new System.Drawing.Point(15, 55); this.lblDesc.Name = "lblDesc"; - this.lblDesc.Size = new System.Drawing.Size(382, 23); + this.lblDesc.Size = new System.Drawing.Size(307, 19); this.lblDesc.TabIndex = 13; this.lblDesc.Text = "A configuration manager for the 86Box emulator"; // @@ -537,26 +520,37 @@ private void InitializeComponent() this.lblTitle.Anchor = System.Windows.Forms.AnchorStyles.Top; this.lblTitle.AutoSize = true; this.lblTitle.Font = new System.Drawing.Font("Segoe UI Semibold", 15F, System.Drawing.FontStyle.Bold); - this.lblTitle.Location = new System.Drawing.Point(79, 24); - this.lblTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.lblTitle.Location = new System.Drawing.Point(63, 19); this.lblTitle.Name = "lblTitle"; - this.lblTitle.Size = new System.Drawing.Size(194, 35); + this.lblTitle.Size = new System.Drawing.Size(154, 28); this.lblTitle.TabIndex = 11; this.lblTitle.Text = "86Box Manager"; // + // cbxStartVMFullscreen + // + this.cbxStartVMFullscreen.AutoSize = true; + this.cbxStartVMFullscreen.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.cbxStartVMFullscreen.Location = new System.Drawing.Point(285, 51); + this.cbxStartVMFullscreen.Margin = new System.Windows.Forms.Padding(2); + this.cbxStartVMFullscreen.Name = "cbxStartVMFullscreen"; + this.cbxStartVMFullscreen.Size = new System.Drawing.Size(220, 24); + this.cbxStartVMFullscreen.TabIndex = 14; + this.cbxStartVMFullscreen.Text = "Start 86Box in fullscreen mode"; + this.cbxStartVMFullscreen.UseVisualStyleBackColor = true; + this.cbxStartVMFullscreen.CheckedChanged += new System.EventHandler(this.cbx_CheckedChanged); + // // dlgSettings // this.AcceptButton = this.btnOK; - this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.Color.White; this.CancelButton = this.btnCancel; - this.ClientSize = new System.Drawing.Size(886, 420); + this.ClientSize = new System.Drawing.Size(709, 336); this.Controls.Add(this.tbcSettings); this.Controls.Add(this.pnlBottom); this.Font = new System.Drawing.Font("Segoe UI", 10F); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Margin = new System.Windows.Forms.Padding(4); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "dlgSettings"; @@ -625,5 +619,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblVersion; private System.Windows.Forms.Label lblDesc; private System.Windows.Forms.Label lblTitle; + private System.Windows.Forms.CheckBox cbxStartVMFullscreen; } } \ No newline at end of file diff --git a/86BoxManager/dlgSettings.cs b/86BoxManager/dlgSettings.cs index cdceb56..bf00b1c 100644 --- a/86BoxManager/dlgSettings.cs +++ b/86BoxManager/dlgSettings.cs @@ -153,6 +153,7 @@ private bool SaveSettings() regkey.SetValue("EnableLogging", cbxLogging.Checked, RegistryValueKind.DWord); regkey.SetValue("LogPath", txtLogPath.Text, RegistryValueKind.String); regkey.SetValue("EnableGridLines", cbxGrid.Checked, RegistryValueKind.DWord); + regkey.SetValue("StartVMFullscreen", cbxStartVMFullscreen.Checked, RegistryValueKind.DWord); regkey.Close(); settingsChanged = CheckForChanges(); @@ -198,6 +199,7 @@ private void LoadSettings() cbxGrid.Checked = false; btnBrowse3.Enabled = false; txtLogPath.Enabled = false; + cbxStartVMFullscreen.Checked = false; SaveSettings(); //This will write the default values to the registry } @@ -212,6 +214,7 @@ private void LoadSettings() cbxCloseTray.Checked = Convert.ToBoolean(regkey.GetValue("CloseToTray")); cbxLogging.Checked = Convert.ToBoolean(regkey.GetValue("EnableLogging")); cbxGrid.Checked = Convert.ToBoolean(regkey.GetValue("EnableGridLines")); + cbxStartVMFullscreen.Checked = Convert.ToBoolean(regkey.GetValue("StartVMFullscreen")); txtLogPath.Enabled = cbxLogging.Checked; btnBrowse3.Enabled = cbxLogging.Checked; } @@ -233,6 +236,7 @@ private void LoadSettings() cbxGrid.Checked = false; txtLogPath.Enabled = false; btnBrowse3.Enabled = false; + cbxStartVMFullscreen.Checked = false; } } @@ -304,6 +308,7 @@ private void ResetSettings() cbxGrid.Checked = false; txtLogPath.Enabled = false; btnBrowse3.Enabled = false; + cbxStartVMFullscreen.Checked = false; settingsChanged = CheckForChanges(); } @@ -324,7 +329,8 @@ private bool CheckForChanges() cbxMinimizeTray.Checked != Convert.ToBoolean(regkey.GetValue("MinimizeToTray")) || cbxCloseTray.Checked != Convert.ToBoolean(regkey.GetValue("CloseToTray")) || cbxLogging.Checked != Convert.ToBoolean(regkey.GetValue("EnableLogging")) || - cbxGrid.Checked != Convert.ToBoolean(regkey.GetValue("EnableGridLines"))); + cbxGrid.Checked != Convert.ToBoolean(regkey.GetValue("EnableGridLines")) || + cbxStartVMFullscreen.Checked != Convert.ToBoolean(regkey.GetValue("StartVMFullscreen"))); return btnApply.Enabled; } diff --git a/86BoxManager/frmMain.cs b/86BoxManager/frmMain.cs index fbe586c..8395f70 100644 --- a/86BoxManager/frmMain.cs +++ b/86BoxManager/frmMain.cs @@ -44,6 +44,7 @@ public struct COPYDATASTRUCT private bool logging = false; //Logging enabled for 86Box.exe (-L parameter)? private string logpath = ""; //Path to log file private bool gridlines = false; //Are grid lines enabled for VM list? + private bool startVMFullscreen = false; //Start VM in fullscreen mode public frmMain() { @@ -241,6 +242,7 @@ private void LoadSettings() gridlines = false; sortColumn = 0; sortOrder = SortOrder.Ascending; + startVMFullscreen = false; lstVMs.GridLines = false; VMSort(sortColumn, sortOrder); @@ -258,6 +260,7 @@ private void LoadSettings() regkey.SetValue("EnableGridLines", gridlines, RegistryValueKind.DWord); regkey.SetValue("SortColumn", sortColumn, RegistryValueKind.DWord); regkey.SetValue("SortOrder", sortOrder, RegistryValueKind.DWord); + regkey.SetValue("StartVMFullscreen", startVMFullscreen, RegistryValueKind.DWord); } else { @@ -272,6 +275,7 @@ private void LoadSettings() gridlines = Convert.ToBoolean(regkey.GetValue("EnableGridLines")); sortColumn = (int)regkey.GetValue("SortColumn"); sortOrder = (SortOrder)regkey.GetValue("SortOrder"); + startVMFullscreen = Convert.ToBoolean(regkey.GetValue("StartVMFullscreen")); lstVMs.GridLines = gridlines; VMSort(sortColumn, sortOrder); @@ -636,6 +640,10 @@ private void VMStart() Process p = new Process(); p.StartInfo.FileName = exepath + "86Box.exe"; p.StartInfo.Arguments = "--vmpath \"" + lstVMs.SelectedItems[0].SubItems[3].Text + "\" --hwnd " + idString + "," + hWndHex; + if (startVMFullscreen) + { + p.StartInfo.Arguments += " -f"; + } if (logging) {