[C#] 一个简单的WinForm程序 →→→→→进入此内容的聊天室

来自 , 2019-05-22, 写在 C#, 查看 156 次.
URL http://www.code666.cn/view/d26b10ca
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7.  
  8.  
  9. public class SimpleForm : System.Windows.Forms.Form
  10. {
  11.  
  12. private System.ComponentModel.Container components = null;
  13. private System.Windows.Forms.Button button1;
  14. private System.Windows.Forms.TextBox textBox1;
  15. public SimpleForm()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. protected override void Dispose( bool disposing )
  21. {
  22. if( disposing )
  23. {
  24. if (components != null)
  25. {
  26. components.Dispose();
  27. }
  28. }
  29. base.Dispose( disposing );
  30. }
  31.  
  32. #region Windows Form Designer generated code
  33. private void InitializeComponent()
  34. {
  35.  
  36. this.components = new System.ComponentModel.Container();
  37. this.Size = new System.Drawing.Size(300,300);
  38. this.Text = Form1;
  39.  
  40. this.button1 = new System.Windows.Forms.Button();
  41. this.textBox1 = new System.Windows.Forms.TextBox();
  42. this.SuspendLayout();
  43. //
  44. // button1
  45. //
  46.  
  47. this.button1.Location = new System.Drawing.Point(8, 16);
  48. this.button1.Name = button1;
  49. this.button1.Size = new System.Drawing.Size(80, 24);
  50. this.button1.TabIndex = 0;
  51. this.button1.Text = button1;
  52.  
  53. //
  54. // textBox1
  55. //
  56. this.textBox1.Location = new System.Drawing.Point(112, 16);
  57. this.textBox1.Name = textBox1;
  58. this.textBox1.Size = new System.Drawing.Size(160, 20);
  59. this.textBox1.TabIndex = 1;
  60. this.textBox1.Text = textBox1;
  61. //
  62. // Form1
  63. //
  64.  
  65. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  66. this.ClientSize = new System.Drawing.Size(292, 273);
  67. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  68. this.textBox1,
  69. this.button1});
  70. this.Name = Form1;
  71. this.Text = Form1;
  72. this.ResumeLayout(false);
  73.  
  74. }
  75. #endregion
  76.  
  77. [STAThread]
  78. static void Main()
  79. {
  80. Application.Run(new SimpleForm());
  81. }
  82. }
  83.  
  84. //csharp/1139

回复 "一个简单的WinForm程序"

这儿你可以回复上面这条便签

captcha