Jump to content

Recommended Posts

Posted

 Based on the X11 comment I used code below.  It idoes more or less what I need.

A question to you all 

Which code should I include in the code below which would  be equivalent to do manually - in the Delphi IDE - the  RUN  >> PROGRAM RESET    . This is not necessary in  VCL but when I am running the Unigui code I close the browser page but the Delphi remains "running"

////////////////////////////////////////////

procedure TMainForm.CloseBUTClick(Sender: TObject);                        ( include ShellAPI in the USES clause)
var Comando:string;
begin
  Comando:= 'taskkill -im switchgeardesign.exe /f /t';
 //  Comando:= 'taskkill -im bds.exe /f /t';
  ShellExecute(Handle, 'open', 'cmd.exe', PChar('/c'+Comando ), nil, 0);
   UniApplication.Terminate(' To close the application, just close the tab. To restart click below');
end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...