MainForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit MainForm;
- interface
- uses
- Qt, SysUtils, Classes, QGraphics, QControls, QForms, QDialogs,
- QStdCtrls;
- type
- TForm1 = class(TForm)
- btnMultiple: TButton;
- btnSingle: TButton;
- btnModal: TButton;
- procedure btnSingleClick(Sender: TObject);
- procedure btnMultipleClick(Sender: TObject);
- procedure btnModalClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- uses
- MWForm2, MWForm3, MWForm4;
- {$R *.xfm}
- procedure TForm1.btnSingleClick(Sender: TObject);
- begin
- if not Assigned (Form2) then
- Form2 := TForm2.Create (Application);
- Form2.Show;
- end;
- procedure TForm1.btnMultipleClick(Sender: TObject);
- begin
- with TForm3.Create (Application) do
- Show;
- end;
- procedure TForm1.btnModalClick(Sender: TObject);
- var
- Modal: TForm4;
- begin
- Modal := TForm4.Create (Application);
- try
- Modal.ShowModal;
- finally
- Modal.Free;
- end;
- end;
- end.