//从论坛上copy来,事先自己并未验证
引用秋风兄的代码:
Application.Title := 'PerRecord';
Application.Initialize;
mHandle := Windows.CreateMutex(nil, true, 'PerRecord');
if mHandle 0 then
begin
if GetLastError = Windows.ERROR_ALREADY_EXISTS then
begin
fHandle := FindWindow('TfrmLogin', nil);
if fHandle = 0 then
fHandle := FindWindow('TfrmPer', nil);
if fHandle 0 then
begin
ShowWindow(fHandle, SW_SHOW);...[ 查看全文 ]