-------贴上最有用的代码部分
program Project1;
uses
Forms,
Windows,
Unit1 in 'Unit1.pas' {Form1},//主窗体
Unit2 in 'Unit2.pas' {Form2};//登入窗体
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Form2:= TForm2.Create(Application);
Form2.ShowModal ;
if Form2.ModalResult =1 then //mb_ok
begin
Application.CreateForm(TForm1, Form1);
Application.Run;
end
else
begin
Application.ShowMainForm :=False;
Application.Terminate ;
end;
end.