LoadingForm.Designer.cs 代码:
namespace
SplashForm
... {
partial class LoadingForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.lblpercent = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(0, 13);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(265, 23);
this.progressBar1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(81, 14);
this.label1.TabIndex = 1;
this.label1.Text = " Loading.....";
//
// panel1
//
this.panel1.Controls.Add(this.lblpercent);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.label1);
this.panel1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel1.Location = new System.Drawing.Point(12, 27);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(268, 81);
this.panel1.TabIndex = 2;
//
// lblpercent
//
this.lblpercent.AutoSize = true;
this.lblpercent.Location = new System.Drawing.Point(107, 39);
this.lblpercent.Name = "lblpercent";
this.lblpercent.Size = new System.Drawing.Size(55, 14);
this.lblpercent.TabIndex = 2;
this.lblpercent.Text = "Percent";
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 125);
this.Controls.Add(this.panel1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Loading ";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoadingForm_FormClosing);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lblpercent;
}
}
... {
partial class LoadingForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.lblpercent = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(0, 13);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(265, 23);
this.progressBar1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 58);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(81, 14);
this.label1.TabIndex = 1;
this.label1.Text = " Loading.....";
//
// panel1
//
this.panel1.Controls.Add(this.lblpercent);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.label1);
this.panel1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.panel1.Location = new System.Drawing.Point(12, 27);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(268, 81);
this.panel1.TabIndex = 2;
//
// lblpercent
//
this.lblpercent.AutoSize = true;
this.lblpercent.Location = new System.Drawing.Point(107, 39);
this.lblpercent.Name = "lblpercent";
this.lblpercent.Size = new System.Drawing.Size(55, 14);
this.lblpercent.TabIndex = 2;
this.lblpercent.Text = "Percent";
//
// LoadingForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 125);
this.Controls.Add(this.panel1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "LoadingForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Loading ";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoadingForm_FormClosing);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lblpercent;
}
}
LoadingForm.cs代码:
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class LoadingForm : Form
...{
public LoadingForm()
...{
InitializeComponent();
}
public void SetProgressValue(int Value)
...{
progressBar1.Value++;
lblpercent.Text = Convert.ToString(progressBar1.Value) + '%';
Application.DoEvents();
}
private void LoadingForm_FormClosing(object sender, FormClosingEventArgs e)
...{
if (Program.Flag == false)
...{
e.Cancel = true;
}
else if ((Program.Flag ==true))
...{
e.Cancel = false;
}
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class LoadingForm : Form
...{
public LoadingForm()
...{
InitializeComponent();
}
public void SetProgressValue(int Value)
...{
progressBar1.Value++;
lblpercent.Text = Convert.ToString(progressBar1.Value) + '%';
Application.DoEvents();
}
private void LoadingForm_FormClosing(object sender, FormClosingEventArgs e)
...{
if (Program.Flag == false)
...{
e.Cancel = true;
}
else if ((Program.Flag ==true))
...{
e.Cancel = false;
}
}
}
}
MainForm.Designer.cs代码:
namespace
SplashForm
... {
partial class MainForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.button1 = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(107, 58);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Click Me ";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] ...{
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(292, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] ...{
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Text = "&File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "&Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 140);
this.Controls.Add(this.button1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
}
}
... {
partial class MainForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.button1 = new System.Windows.Forms.Button();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
// button1
//
this.button1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(107, 58);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Click Me ";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] ...{
this.fileToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(292, 24);
this.menuStrip1.TabIndex = 1;
this.menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] ...{
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20);
this.fileToolStripMenuItem.Text = "&File";
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.exitToolStripMenuItem.Text = "&Exit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 140);
this.Controls.Add(this.button1);
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
}
}
MainForm.cs代码:
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class MainForm : Form
...{
public MainForm()
...{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
...{
for(int i=0;i<100;i++)
...{
Program.loadingForm.SetProgressValue(i);
System.Threading.Thread.Sleep(20);
}
}
protected override void OnShown(EventArgs e)
...{
if (Program.loadingForm != null)
...{
Program.Flag = true;
Program.loadingForm.Close();
Program.loadingForm = null;
}
base.OnShown(e);
}
private void button1_Click(object sender, EventArgs e)
...{
HelloForm ShowForm = new HelloForm();
if (ShowForm.ShowDialog() == DialogResult.Cancel)
...{
ShowForm.Close();
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
...{
Application.Exit();
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class MainForm : Form
...{
public MainForm()
...{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
...{
for(int i=0;i<100;i++)
...{
Program.loadingForm.SetProgressValue(i);
System.Threading.Thread.Sleep(20);
}
}
protected override void OnShown(EventArgs e)
...{
if (Program.loadingForm != null)
...{
Program.Flag = true;
Program.loadingForm.Close();
Program.loadingForm = null;
}
base.OnShown(e);
}
private void button1_Click(object sender, EventArgs e)
...{
HelloForm ShowForm = new HelloForm();
if (ShowForm.ShowDialog() == DialogResult.Cancel)
...{
ShowForm.Close();
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
...{
Application.Exit();
}
}
}
HelloForm.Designer.cs代码:
using
System;
namespace SplashForm
... {
partial class HelloForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(67, 10);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 14);
this.label1.TabIndex = 0;
this.label1.Text = "Hello, World !";
//
// button1
//
this.button1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(80, 41);
this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(67, 21);
this.button1.TabIndex = 1;
this.button1.Text = "ok";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(244, 82);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form3";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Hello";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form3_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private Boolean Flags = false;
}
}
namespace SplashForm
... {
partial class HelloForm
...{
/**//// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/**//// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
...{
if (disposing && (components != null))
...{
components.Dispose();
}
base.Dispose(disposing);
}
Windows Form Designer generated code#region Windows Form Designer generated code
/**//// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
...{
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(67, 10);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 14);
this.label1.TabIndex = 0;
this.label1.Text = "Hello, World !";
//
// button1
//
this.button1.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(80, 41);
this.button1.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(67, 21);
this.button1.TabIndex = 1;
this.button1.Text = "ok";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// Form3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(244, 82);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Form3";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Hello";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form3_FormClosing);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private Boolean Flags = false;
}
}
HelloForm.cs代码:
using
System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class HelloForm : Form
...{
public HelloForm()
...{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
...{
Flags = true;
this.Close();
}
private void Form3_FormClosing(object sender, FormClosingEventArgs e)
...{
if (Flags == false)
...{
e.Cancel = true;
}
else if (Flags == true)
...{
e.Cancel = false;
}
}
}
}
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SplashForm
... {
public partial class HelloForm : Form
...{
public HelloForm()
...{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
...{
Flags = true;
this.Close();
}
private void Form3_FormClosing(object sender, FormClosingEventArgs e)
...{
if (Flags == false)
...{
e.Cancel = true;
}
else if (Flags == true)
...{
e.Cancel = false;
}
}
}
}