Form1.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:3k
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.Data;
- namespace SimpleWinApp
- {
- /// <summary>
- /// Summary description for Form1.
- /// </summary>
- public class Form1 : System.Windows.Forms.Form
- {
- private System.Windows.Forms.TextBox textBox1;
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.Container components = null;
- public Form1()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
- //
- // TODO: Add any constructor code after InitializeComponent call
- //
- //this.Visible = true;
- this.Show();
- System.Diagnostics.Trace.WriteLine("Constructor");
- }
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- System.Diagnostics.Trace.WriteLine("Dispose");
- }
- #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.textBox1 = new System.Windows.Forms.TextBox();
- this.SuspendLayout();
- //
- // textBox1
- //
- this.textBox1.Location = new System.Drawing.Point(72, 56);
- this.textBox1.Name = "textBox1";
- this.textBox1.TabIndex = 0;
- this.textBox1.Text = "textBox1";
- //
- // Form1
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.ClientSize = new System.Drawing.Size(292, 271);
- this.Controls.Add(this.textBox1);
- this.Name = "Form1";
- this.Text = "Form1";
- this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
- this.Load += new System.EventHandler(this.Form1_Load);
- this.Closed += new System.EventHandler(this.Form1_Closed);
- this.Activated += new System.EventHandler(this.Form1_Activated);
- this.Leave += new System.EventHandler(this.Form1_Leave);
- this.Enter += new System.EventHandler(this.Form1_Enter);
- this.Deactivate += new System.EventHandler(this.Form1_Deactivate);
- this.ResumeLayout(false);
- }
- #endregion
-
- private void Form1_Closed(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Closed");
- }
- private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Closing");
- }
- private void Form1_Load(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Load");
- }
- private void Form1_Activated(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Activated");
- }
- private void Form1_Deactivate(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Deactivate " + textBox1.Text);
- }
- private void Form1_Enter(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Enter");
- }
- private void Form1_Leave(object sender, System.EventArgs e)
- {
- System.Diagnostics.Trace.WriteLine("Leave");
- }
- }
- }