W
wdsu
Unregistered / Unconfirmed
GUEST, unregistred user!
var Hwnd:THandle;
begin
Hwnd:=FindWindow ('Tfm_mainxt','fm_mainxt');
if Hwnd=0 then
begin
Application.Initialize;
try
fm_flash:=Tfm_flash.Create(Application);
fm_flash.Show;
fm_flash.Update;
// fm_login:=Tfm_login.create(Application);
// fm_login.show;
// fm_login.update;
// while fm_login.Active do
// Application.ProcessMessages;
// fm_login.Close;
// fm_login.Free;
Application.Title := '轧料数据管理系统';
Application.CreateForm(TDataModule2, DataModule2);
Application.CreateForm(Tfm_mainxt, fm_mainxt);
Application.CreateForm(Tfm_ordrpt, fm_ordrpt);
Application.CreateForm(TAboutBox, AboutBox);
finally
fm_flash.Hide;
fm_flash.Free;
end;
Application.Run;
end
else
begin
MessageDlg ('你已经运行了本程序的一个拷贝!',mtInformation, [mbOk], 0);
end;
但程序没用,照样可以运行无数个,不知那里出错了,希望高手指点迷津,谢谢!
begin
Hwnd:=FindWindow ('Tfm_mainxt','fm_mainxt');
if Hwnd=0 then
begin
Application.Initialize;
try
fm_flash:=Tfm_flash.Create(Application);
fm_flash.Show;
fm_flash.Update;
// fm_login:=Tfm_login.create(Application);
// fm_login.show;
// fm_login.update;
// while fm_login.Active do
// Application.ProcessMessages;
// fm_login.Close;
// fm_login.Free;
Application.Title := '轧料数据管理系统';
Application.CreateForm(TDataModule2, DataModule2);
Application.CreateForm(Tfm_mainxt, fm_mainxt);
Application.CreateForm(Tfm_ordrpt, fm_ordrpt);
Application.CreateForm(TAboutBox, AboutBox);
finally
fm_flash.Hide;
fm_flash.Free;
end;
Application.Run;
end
else
begin
MessageDlg ('你已经运行了本程序的一个拷贝!',mtInformation, [mbOk], 0);
end;
但程序没用,照样可以运行无数个,不知那里出错了,希望高手指点迷津,谢谢!