我给一段程序给你,是在你的工程文件里改的。
program PPMIS;
uses
Forms,
Windows,
SysUtils,
About in 'About.pas' {AboutBox},
fm in 'fm.pas' {Form1},
GetCPUID in 'GetCPUID.pas' {Form16},
login in 'login.pas' {Form13},
main in 'main.pas' {Form2},
Option in 'Option.pas' {Form14},
reg in 'reg.pas' {Form10},
reg1 in 'reg1.pas' {Form15};
{$R *.RES}
Var
hMutex:HWND;
Ret:Integer;
begin
Application.Initialize;
//设置日期格式
DateSeparator := '-';
ShortDateFormat:='yyyy-mm-dd';
form1:=Tform1.Create(form1);
form1.show;
form1.Update;
Application.Title := '《计划生育管理系统》';
hMutex:=CreateMutex(nil,False,'《计划生育管理系统》');
Ret:=GetLastError;
If Ret<>ERROR_ALREADY_EXISTS Then
Begin
Application.CreateForm(TForm13, Form13);
Application.CreateForm(TForm2, Form2);
Application.CreateForm(TAboutBox, AboutBox);
Application.CreateForm(TForm16, Form16);
Application.CreateForm(TForm14, Form14);
Application.CreateForm(TForm10, Form10);
Application.CreateForm(TForm15, Form15);
form1.Hide;
form1.Free;
Application.Run;
End
Else
begin
Application.MessageBox('《计划生育管理系统》正在运行中!','信息!',MB_OK);
end;
ReleaseMutex(hMutex);
end.