Form2.cs
Upload User: chinafred
Upload Date: 2007-08-14
Package Size: 10127k
Code Size: 2k
Category:

ADO-ODBC

Development Platform:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. namespace ch1_3
  7. {
  8. /// <summary>
  9. /// Form2 的摘要说明。
  10. /// </summary>
  11. public class Form2 : System.Windows.Forms.Form
  12. {
  13. private System.Windows.Forms.Label label1;
  14. /// <summary>
  15. /// 必需的设计器变量。
  16. /// </summary>
  17. private System.ComponentModel.Container components = null;
  18. public Form2()
  19. {
  20. //
  21. // Windows 窗体设计器支持所必需的
  22. //
  23. InitializeComponent();
  24. //
  25. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  26. //
  27. }
  28. /// <summary>
  29. /// 清理所有正在使用的资源。
  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. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  45. /// 此方法的内容。
  46. /// </summary>
  47. private void InitializeComponent()
  48. {
  49. this.label1 = new System.Windows.Forms.Label();
  50. this.SuspendLayout();
  51. // 
  52. // label1
  53. // 
  54. this.label1.Font = new System.Drawing.Font("华文行楷", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  55. this.label1.Location = new System.Drawing.Point(16, 24);
  56. this.label1.Name = "label1";
  57. this.label1.Size = new System.Drawing.Size(208, 23);
  58. this.label1.TabIndex = 0;
  59. this.label1.Text = "现在可以看见这个窗体";
  60. this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
  61. // 
  62. // Form2
  63. // 
  64. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  65. this.ClientSize = new System.Drawing.Size(248, 77);
  66. this.Controls.Add(this.label1);
  67. this.Name = "Form2";
  68. this.Opacity = 0.8;
  69. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  70. this.Text = "新建窗体";
  71. this.TopMost = true;
  72. this.Load += new System.EventHandler(this.Form2_Load);
  73. this.ResumeLayout(false);
  74. }
  75. #endregion
  76. private void Form2_Load(object sender, System.EventArgs e)
  77. {
  78. //设置窗体的位置和大小
  79. Rectangle pos= new Rectangle(550,250,300,300);
  80. this.Bounds=pos;
  81. }
  82. }
  83. }