Hi guys, I have this code:
-----------
procedure TForm1.Button1Click(Sender
: TObject);
var
H: THandle;
begin
H := FindWindow(nil, 'TestExe');
if H = 0 then
//executes a code to popup a form(DLL) in a different handle.
----------
It will check if the 'TestExe' is already running so that it will have a single instance only.
When i close the 'TestExe' then click again the button to popup the form(DLL),
the condition "FindWindow" returns a value greater than 0. So the form will not show anymore...
Any idea on how to do this? Thanks in advance
Start Free Trial