Form2.cs
上传用户:sflyled
上传日期:2013-01-18
资源大小:1760k
文件大小:3k
源码类别:

.net编程

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace imageView
  7. {
  8. /// <summary>
  9. /// Summary description for Form2.
  10. /// </summary>
  11. public class TestForm : System.Windows.Forms.Form
  12. {
  13.         private System.Windows.Forms.Button button1;
  14. /// <summary>
  15. /// Required designer variable.
  16. /// </summary>
  17. private System.ComponentModel.Container components = null;
  18. public TestForm()
  19. {
  20. //
  21. // Required for Windows Form Designer support
  22. //
  23. InitializeComponent();
  24. //
  25. // TODO: Add any constructor code after InitializeComponent call
  26. //
  27. }
  28. /// <summary>
  29. /// Clean up any resources being used.
  30. /// </summary>
  31. protected override void Dispose( bool disposing )
  32. {
  33. if( disposing )
  34. {
  35. if(components != null)
  36. {
  37. components.Dispose();
  38. }
  39. }
  40. base.Dispose( disposing );
  41. }
  42. #region Windows Form Designer generated code
  43. /// <summary>
  44. /// Required method for Designer support - do not modify
  45. /// the contents of this method with the code editor.
  46. /// </summary>
  47. private void InitializeComponent()
  48. {
  49.             this.button1 = new System.Windows.Forms.Button();
  50.             this.SuspendLayout();
  51.             // 
  52.             // button1
  53.             // 
  54.             this.button1.Location = new System.Drawing.Point(168, 88);
  55.             this.button1.Name = "button1";
  56.             this.button1.Size = new System.Drawing.Size(88, 24);
  57.             this.button1.TabIndex = 0;
  58.             this.button1.Text = "button1";
  59.             this.button1.Click += new System.EventHandler(this.button1_Click);
  60.             // 
  61.             // TestForm
  62.             // 
  63.             this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  64.             this.ClientSize = new System.Drawing.Size(292, 273);
  65.             this.Controls.AddRange(new System.Windows.Forms.Control[] {
  66.                                                                           this.button1});
  67.             this.Name = "TestForm";
  68.             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  69.             this.Text = "测试";
  70.             this.Load += new System.EventHandler(this.TestForm_Load);
  71.             this.ResumeLayout(false);
  72.         }
  73. #endregion
  74.         private void TestForm_Load(object sender, System.EventArgs e)
  75.         {
  76.         }
  77.         private void button1_Click(object sender, System.EventArgs e)
  78.         {
  79.             this.Visible = false;
  80.         }
  81. }
  82. }