其他分享
首页 > 其他分享> > Delphi登入时主窗体实现简单隐藏

Delphi登入时主窗体实现简单隐藏

作者:互联网

-------贴上最有用的代码部分

 

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.

标签:begin,pas,end,Form2,Delphi,Application,窗体,入时
来源: https://www.cnblogs.com/dmqhjp/p/14155630.html