Código
program Cobrancas;
uses
Forms,
Controls,
Windows,
{$R *.res}
var
hMutex: THandle;
begin
hMutex := CreateMutex(nil, true, PChar('[{23B1EEFF-4775-4FA9-9C5-6BFEAC48F551}]'));
if (hMutex <> 0) and (GetLastError = 0) then
begin
Application.Initialize;
Application.CreateForm(TfrmPrincipal, frmPrincipal);
Application.Run;
end
else
MensagemDeAvisoH('Já Existe Uma Instância do Aplicativo Rodando...');
end.
Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009