⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 winform.pas.~1~

📁 Delphi 2005程序设计教程_实例源文件和教学课件
💻 ~1~
字号:
unit WinForm;

interface

uses
  System.Drawing, System.Collections, System.ComponentModel,
  System.Windows.Forms, System.Data;

type
  TWinForm = class(System.Windows.Forms.Form)
  {$REGION 'Designer Managed Code'}
  strict private
    /// <summary>
    /// Required designer variable.
    /// </summary>
    Components: System.ComponentModel.Container;
    ComboBox1: System.Windows.Forms.ComboBox;
    TreeView1: System.Windows.Forms.TreeView;
    ListView1: System.Windows.Forms.ListView;
    Label1: System.Windows.Forms.Label;
    Label2: System.Windows.Forms.Label;
    TextBox1: System.Windows.Forms.TextBox;
    Label3: System.Windows.Forms.Label;
    Label4: System.Windows.Forms.Label;
    Button1: System.Windows.Forms.Button;
    Button2: System.Windows.Forms.Button;
    Button3: System.Windows.Forms.Button;
    Button4: System.Windows.Forms.Button;
    CheckBox1: System.Windows.Forms.CheckBox;
    Label5: System.Windows.Forms.Label;
    Button5: System.Windows.Forms.Button;
    TextBox2: System.Windows.Forms.TextBox;
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    procedure InitializeComponent;
  {$ENDREGION}
  strict protected
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    procedure Dispose(Disposing: Boolean); override;
  private
    { Private Declarations }
  public
    constructor Create;
  end;

  [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))]

implementation

{$AUTOBOX ON}

{$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>
procedure TWinForm.InitializeComponent;
type
  TArrayOfString = array of string;
  TArrayOfSystem_Windows_Forms_ListViewItem = array of System.Windows.Forms.ListViewItem;
var
  ListViewItem12: System.Windows.Forms.ListViewItem;
  ListViewItem11: System.Windows.Forms.ListViewItem;
begin
  ListViewItem11 := System.Windows.Forms.ListViewItem.Create(TArrayOfString.Create('姓' +
        '名', '院系'), -1);
  ListViewItem12 := System.Windows.Forms.ListViewItem.Create(TArrayOfString.Create('张' +
        '艳玲', '工程学院'), -1);
  Self.ComboBox1 := System.Windows.Forms.ComboBox.Create;
  Self.TreeView1 := System.Windows.Forms.TreeView.Create;
  Self.ListView1 := System.Windows.Forms.ListView.Create;
  Self.Label1 := System.Windows.Forms.Label.Create;
  Self.Label2 := System.Windows.Forms.Label.Create;
  Self.TextBox1 := System.Windows.Forms.TextBox.Create;
  Self.Label3 := System.Windows.Forms.Label.Create;
  Self.Label4 := System.Windows.Forms.Label.Create;
  Self.Button1 := System.Windows.Forms.Button.Create;
  Self.Button2 := System.Windows.Forms.Button.Create;
  Self.Button3 := System.Windows.Forms.Button.Create;
  Self.Button4 := System.Windows.Forms.Button.Create;
  Self.CheckBox1 := System.Windows.Forms.CheckBox.Create;
  Self.Label5 := System.Windows.Forms.Label.Create;
  Self.Button5 := System.Windows.Forms.Button.Create;
  Self.TextBox2 := System.Windows.Forms.TextBox.Create;
  Self.SuspendLayout;
  // 
  // ComboBox1
  // 
  Self.ComboBox1.Location := System.Drawing.Point.Create(48, 88);
  Self.ComboBox1.Name := 'ComboBox1';
  Self.ComboBox1.Size := System.Drawing.Size.Create(121, 20);
  Self.ComboBox1.TabIndex := 1;
  Self.ComboBox1.Text := 'ComboBox1';
  // 
  // TreeView1
  // 
  Self.TreeView1.ImageIndex := -1;
  Self.TreeView1.Location := System.Drawing.Point.Create(184, 192);
  Self.TreeView1.Name := 'TreeView1';
  Self.TreeView1.SelectedImageIndex := -1;
  Self.TreeView1.Size := System.Drawing.Size.Create(232, 144);
  Self.TreeView1.TabIndex := 3;
  // 
  // ListView1
  // 
  Self.ListView1.Items.AddRange(TArrayOfSystem_Windows_Forms_ListViewItem.Create(ListViewItem11, 
          ListViewItem12));
  Self.ListView1.Location := System.Drawing.Point.Create(184, 32);
  Self.ListView1.Name := 'ListView1';
  Self.ListView1.Size := System.Drawing.Size.Create(232, 112);
  Self.ListView1.TabIndex := 4;
  // 
  // Label1
  // 
  Self.Label1.Location := System.Drawing.Point.Create(8, 32);
  Self.Label1.Name := 'Label1';
  Self.Label1.Size := System.Drawing.Size.Create(32, 16);
  Self.Label1.TabIndex := 5;
  Self.Label1.Text := '姓名';
  // 
  // Label2
  // 
  Self.Label2.Location := System.Drawing.Point.Create(8, 88);
  Self.Label2.Name := 'Label2';
  Self.Label2.Size := System.Drawing.Size.Create(32, 16);
  Self.Label2.TabIndex := 6;
  Self.Label2.Text := '院系';
  // 
  // TextBox1
  // 
  Self.TextBox1.Location := System.Drawing.Point.Create(48, 32);
  Self.TextBox1.Name := 'TextBox1';
  Self.TextBox1.Size := System.Drawing.Size.Create(121, 21);
  Self.TextBox1.TabIndex := 7;
  Self.TextBox1.Text := 'TextBox1';
  // 
  // Label3
  // 
  Self.Label3.Location := System.Drawing.Point.Create(200, 8);
  Self.Label3.Name := 'Label3';
  Self.Label3.Size := System.Drawing.Size.Create(64, 16);
  Self.Label3.TabIndex := 8;
  Self.Label3.Text := '学生列表';
  // 
  // Label4
  // 
  Self.Label4.Location := System.Drawing.Point.Create(200, 168);
  Self.Label4.Name := 'Label4';
  Self.Label4.Size := System.Drawing.Size.Create(64, 16);
  Self.Label4.TabIndex := 9;
  Self.Label4.Text := '院系结构';
  // 
  // Button1
  // 
  Self.Button1.Location := System.Drawing.Point.Create(16, 128);
  Self.Button1.Name := 'Button1';
  Self.Button1.Size := System.Drawing.Size.Create(64, 23);
  Self.Button1.TabIndex := 10;
  Self.Button1.Text := '添加';
  // 
  // Button2
  // 
  Self.Button2.Location := System.Drawing.Point.Create(104, 128);
  Self.Button2.Name := 'Button2';
  Self.Button2.Size := System.Drawing.Size.Create(64, 23);
  Self.Button2.TabIndex := 11;
  Self.Button2.Text := '删除';
  // 
  // Button3
  // 
  Self.Button3.Location := System.Drawing.Point.Create(104, 240);
  Self.Button3.Name := 'Button3';
  Self.Button3.Size := System.Drawing.Size.Create(64, 23);
  Self.Button3.TabIndex := 13;
  Self.Button3.Text := '删除';
  // 
  // Button4
  // 
  Self.Button4.Location := System.Drawing.Point.Create(16, 240);
  Self.Button4.Name := 'Button4';
  Self.Button4.Size := System.Drawing.Size.Create(64, 23);
  Self.Button4.TabIndex := 12;
  Self.Button4.Text := '添加';
  // 
  // CheckBox1
  // 
  Self.CheckBox1.AllowDrop := True;
  Self.CheckBox1.Location := System.Drawing.Point.Create(280, 160);
  Self.CheckBox1.Name := 'CheckBox1';
  Self.CheckBox1.Size := System.Drawing.Size.Create(80, 24);
  Self.CheckBox1.TabIndex := 14;
  Self.CheckBox1.Text := '带复选框';
  // 
  // Label5
  // 
  Self.Label5.Location := System.Drawing.Point.Create(8, 200);
  Self.Label5.Name := 'Label5';
  Self.Label5.Size := System.Drawing.Size.Create(32, 16);
  Self.Label5.TabIndex := 16;
  Self.Label5.Text := '院系';
  // 
  // Button5
  // 
  Self.Button5.Location := System.Drawing.Point.Create(56, 304);
  Self.Button5.Name := 'Button5';
  Self.Button5.TabIndex := 17;
  Self.Button5.Text := '退出';
  // 
  // TextBox2
  // 
  Self.TextBox2.Location := System.Drawing.Point.Create(48, 200);
  Self.TextBox2.Name := 'TextBox2';
  Self.TextBox2.Size := System.Drawing.Size.Create(121, 21);
  Self.TextBox2.TabIndex := 18;
  Self.TextBox2.Text := 'TextBox2';
  // 
  // TWinForm
  // 
  Self.AutoScaleBaseSize := System.Drawing.Size.Create(6, 14);
  Self.ClientSize := System.Drawing.Size.Create(424, 349);
  Self.Controls.Add(Self.TextBox2);
  Self.Controls.Add(Self.Button5);
  Self.Controls.Add(Self.Label5);
  Self.Controls.Add(Self.CheckBox1);
  Self.Controls.Add(Self.Button3);
  Self.Controls.Add(Self.Button4);
  Self.Controls.Add(Self.Button2);
  Self.Controls.Add(Self.Button1);
  Self.Controls.Add(Self.Label4);
  Self.Controls.Add(Self.Label3);
  Self.Controls.Add(Self.TextBox1);
  Self.Controls.Add(Self.Label2);
  Self.Controls.Add(Self.Label1);
  Self.Controls.Add(Self.ListView1);
  Self.Controls.Add(Self.TreeView1);
  Self.Controls.Add(Self.ComboBox1);
  Self.Name := 'TWinForm';
  Self.Text := '学生信息';
  Self.ResumeLayout(False);
end;
{$ENDREGION}

procedure TWinForm.Dispose(Disposing: Boolean);
begin
  if Disposing then
  begin
    if Components <> nil then
      Components.Dispose();
  end;
  inherited Dispose(Disposing);
end;

constructor TWinForm.Create;
begin
  inherited Create;
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent;
  //
  // TODO: Add any constructor code after InitializeComponent call
  //
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -