X
xuejinlong
Unregistered / Unconfirmed
GUEST, unregistred user!
program Health;
uses
Forms,
MainUnit in 'MainUnit.pas' {MainFrm},
DMUnit in 'DMUnit.pas' {DMFrm: TDataModule},
FlashUnit in 'FlashUnit.pas' {FlashFrm},
LogInUnit in 'LogInUnit.pas' {LogInFrm},
DLLUnit in 'DLLUnit.pas';
{$R *.RES}
begin
Application.Initialize;
application.ShowMainForm := False;
FlashFrm := TFlashfrm.Create (Application);
FlashFrm.show;
Application.CreateForm(TMainFrm, MainFrm);
Application.CreateForm(TDMFrm, DMFrm);
LogInfrm := TLogInFrm.create(Application);
LogInFrm.ShowModal ;
FlashFrm.Free;
if LogInfrm.IsPass then
begin
application.ShowMainForm := True;
Mainfrm.OperatorCode := LoginFrm.OperatorCode ;
Mainfrm.OperatorNames := LoginFrm.OperatorNames ;
Mainfrm.OperatorSafe := Loginfrm.OperatorSafe ;
end
else
application.Terminate;
Application.Run;
end.
上面的代码有什么问题吗(或不合理的地方)?为什么我在调试时运行到show主窗体时会死机?而单步运行没问题?
uses
Forms,
MainUnit in 'MainUnit.pas' {MainFrm},
DMUnit in 'DMUnit.pas' {DMFrm: TDataModule},
FlashUnit in 'FlashUnit.pas' {FlashFrm},
LogInUnit in 'LogInUnit.pas' {LogInFrm},
DLLUnit in 'DLLUnit.pas';
{$R *.RES}
begin
Application.Initialize;
application.ShowMainForm := False;
FlashFrm := TFlashfrm.Create (Application);
FlashFrm.show;
Application.CreateForm(TMainFrm, MainFrm);
Application.CreateForm(TDMFrm, DMFrm);
LogInfrm := TLogInFrm.create(Application);
LogInFrm.ShowModal ;
FlashFrm.Free;
if LogInfrm.IsPass then
begin
application.ShowMainForm := True;
Mainfrm.OperatorCode := LoginFrm.OperatorCode ;
Mainfrm.OperatorNames := LoginFrm.OperatorNames ;
Mainfrm.OperatorSafe := Loginfrm.OperatorSafe ;
end
else
application.Terminate;
Application.Run;
end.
上面的代码有什么问题吗(或不合理的地方)?为什么我在调试时运行到show主窗体时会死机?而单步运行没问题?