[DUG] Shellexecute question

John Bird johnkbird at paradise.net.nz
Thu Jul 24 16:42:34 NZST 2014


I have a program (Program A) that fires up another (program B)  via ShellExecute, if its not already running.  However even though Program B is started minimised, focus shifts away from Program A, which is a minor nuisance.

Is there any way to stop this within Delphi?  Or will I have to do something like delve into the Windows API?

if ShellExecute(Application.Mainform.Handle, 'open', Pchar(aProgName), PChar(aparaml), PChar(aDir), SW_SHOWMINIMIZED) <= 32 then
  ShowMessage('Start Minimised error:')
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20140724/4b895341/attachment.html 


More information about the Delphi mailing list