custom MessageBox for YesNo/YesNoCancel button modes

This commit is contained in:
n00mkrad
2022-07-24 22:30:30 +02:00
parent 54fb84de23
commit e6034a87b4
15 changed files with 165 additions and 45 deletions

View File

@@ -29,7 +29,9 @@
private void InitializeComponent()
{
this.textLabel = new System.Windows.Forms.Label();
this.okBtn = new HTAlt.WinForms.HTButton();
this.btn1 = new HTAlt.WinForms.HTButton();
this.btn2 = new HTAlt.WinForms.HTButton();
this.btn3 = new HTAlt.WinForms.HTButton();
this.SuspendLayout();
//
// textLabel
@@ -42,20 +44,50 @@
this.textLabel.Size = new System.Drawing.Size(0, 13);
this.textLabel.TabIndex = 8;
//
// okBtn
// btn1
//
this.okBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.okBtn.FlatAppearance.BorderSize = 0;
this.okBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.okBtn.ForeColor = System.Drawing.Color.White;
this.okBtn.Location = new System.Drawing.Point(232, 126);
this.okBtn.Name = "okBtn";
this.okBtn.Size = new System.Drawing.Size(100, 23);
this.okBtn.TabIndex = 46;
this.okBtn.Text = "OK";
this.okBtn.UseVisualStyleBackColor = false;
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
this.btn1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btn1.FlatAppearance.BorderSize = 0;
this.btn1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn1.ForeColor = System.Drawing.Color.White;
this.btn1.Location = new System.Drawing.Point(232, 126);
this.btn1.Name = "btn1";
this.btn1.Size = new System.Drawing.Size(100, 23);
this.btn1.TabIndex = 46;
this.btn1.Text = "OK";
this.btn1.UseVisualStyleBackColor = false;
this.btn1.Click += new System.EventHandler(this.btn1_Click);
//
// btn2
//
this.btn2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btn2.FlatAppearance.BorderSize = 0;
this.btn2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn2.ForeColor = System.Drawing.Color.White;
this.btn2.Location = new System.Drawing.Point(126, 126);
this.btn2.Name = "btn2";
this.btn2.Size = new System.Drawing.Size(100, 23);
this.btn2.TabIndex = 47;
this.btn2.Text = "OK";
this.btn2.UseVisualStyleBackColor = false;
this.btn2.Click += new System.EventHandler(this.btn2_Click);
//
// btn3
//
this.btn3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btn3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.btn3.FlatAppearance.BorderSize = 0;
this.btn3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btn3.ForeColor = System.Drawing.Color.White;
this.btn3.Location = new System.Drawing.Point(20, 126);
this.btn3.Name = "btn3";
this.btn3.Size = new System.Drawing.Size(100, 23);
this.btn3.TabIndex = 48;
this.btn3.Text = "OK";
this.btn3.UseVisualStyleBackColor = false;
this.btn3.Click += new System.EventHandler(this.btn3_Click);
//
// MessageForm
//
@@ -63,7 +95,9 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(32)))), ((int)(((byte)(32)))), ((int)(((byte)(32)))));
this.ClientSize = new System.Drawing.Size(344, 161);
this.Controls.Add(this.okBtn);
this.Controls.Add(this.btn3);
this.Controls.Add(this.btn2);
this.Controls.Add(this.btn1);
this.Controls.Add(this.textLabel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
@@ -71,6 +105,7 @@
this.Name = "MessageForm";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MessageForm_FormClosing);
this.Load += new System.EventHandler(this.MessageForm_Load);
this.ResumeLayout(false);
this.PerformLayout();
@@ -80,6 +115,8 @@
#endregion
private System.Windows.Forms.Label textLabel;
private HTAlt.WinForms.HTButton okBtn;
private HTAlt.WinForms.HTButton btn1;
private HTAlt.WinForms.HTButton btn2;
private HTAlt.WinForms.HTButton btn3;
}
}