program TelFaxPr;uses
Forms,
Windows,
SysUtils,
TelFaxMain in 'TelFaxMain.pas' {MainFrom},
SubInfo in 'SubInfo.pas' {Frm_Sub},
VocInfo in 'VocInfo.pas' {Frm_Voc},
SetGroup in 'SetGroup.pas' {Frm_Group},
FaxInfo in 'FaxInfo.pas' {Frm_Fax},
RwInfo in 'RwInfo.pas' {Frm_Rw},
DataModule in 'DataModule.pas' {DM: TDataModule},
SysWait in 'SysWait.pas' {Frm_wait},
About in 'About.pas' {Frm_About},
{$R *.RES}
Var
hMutex:HWND;
Ret:Integer;
begin
Application.Initialize;
Application.Title := '传真语音系统';
Form1:=TForm1.Create(Application);
Form1.Show;
Form1.Update;
Sleep(1000);
hMutex:=CreateMutex(nil,False,'传真语音系统');
Ret:=GetLastError;
If Ret<>ERROR_ALREADY_EXISTS Then
Begin
Application.CreateForm(TFrm_Login, Frm_Login);
Application.CreateForm(TDM, DM);
Application.CreateForm(TFrm_wait, Frm_wait);
Application.Run;
End;
Form1.Free;
ReleaseMutex(hMutex);
end.
创建了一个flash 的界面 和 一个Mutex用以防止程序多次运行
Forms,
Windows,
SysUtils,
TelFaxMain in 'TelFaxMain.pas' {MainFrom},
SubInfo in 'SubInfo.pas' {Frm_Sub},
VocInfo in 'VocInfo.pas' {Frm_Voc},
SetGroup in 'SetGroup.pas' {Frm_Group},
FaxInfo in 'FaxInfo.pas' {Frm_Fax},
RwInfo in 'RwInfo.pas' {Frm_Rw},
DataModule in 'DataModule.pas' {DM: TDataModule},
SysWait in 'SysWait.pas' {Frm_wait},
About in 'About.pas' {Frm_About},
{$R *.RES}
Var
hMutex:HWND;
Ret:Integer;
begin
Application.Initialize;
Application.Title := '传真语音系统';
Form1:=TForm1.Create(Application);
Form1.Show;
Form1.Update;
Sleep(1000);
hMutex:=CreateMutex(nil,False,'传真语音系统');
Ret:=GetLastError;
If Ret<>ERROR_ALREADY_EXISTS Then
Begin
Application.CreateForm(TFrm_Login, Frm_Login);
Application.CreateForm(TDM, DM);
Application.CreateForm(TFrm_wait, Frm_wait);
Application.Run;
End;
Form1.Free;
ReleaseMutex(hMutex);
end.
创建了一个flash 的界面 和 一个Mutex用以防止程序多次运行
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货