HideForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit HideForm;
- interface
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls;
- type
- TForm1 = class(TForm)
- procedure Button1Click(Sender: TObject);
- procedure Edit1Change(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- Button1: TButton;
- Edit1: TEdit;
- ListBox1: TListBox;
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.DFM}
- procedure TForm1.Button1Click(Sender: TObject);
- begin
- ListBox1.Items.Add (Edit1.Text);
- end;
- procedure TForm1.Edit1Change(Sender: TObject);
- begin
- Button1.Enabled := Length (Edit1.Text) <> 0;
- end;
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- Button1 := FindComponent ('Button1') as TButton;
- Edit1 := FindComponent ('Edit1') as TEdit;
- ListBox1 := FindComponent ('ListBox1') as TListBox;
- end;
- initialization
- RegisterClasses ([TButton, TEdit, TListBox]);
- end.