MessageBoxOp : Form has a windows title so that it can be moved.

This commit is contained in:
Milan Hanajik 2018-09-06 17:14:35 +02:00
parent e5c01a14d9
commit 2b0e66c71d
2 changed files with 9 additions and 1 deletions

View File

@ -66,10 +66,13 @@ namespace TBF.BenchControl.Operations
this.Controls.Add(this.messageLabel);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "MessageBoxForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.TopMost = true;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MessageBoxForm_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -18,7 +18,7 @@ namespace TBF.BenchControl.Operations
public MessageBoxForm(string message, Color backgroundColor)
{
InitializeComponent();
ControlBox = false;
//ControlBox = false;
Localize();
messageLabel.Text = message;
@ -67,5 +67,10 @@ namespace TBF.BenchControl.Operations
}
#endregion
private void MessageBoxForm_FormClosing(object sender, FormClosingEventArgs e)
{
completed = true;
}
}
}