Board index » delphi » How to switch to a running app

How to switch to a running app

How can I switch to a running application from Delphi? Anything
based on WinExec will try to start up another copy of the running
application, as far as I can tell.

Thanks -- John

 

Re:How to switch to a running app


Quote
On Tuesday, May 7, 1996, "John E. Bell" wrote...
> How can I switch to a running application from Delphi? Anything
> based on WinExec will try to start up another copy of the running
> application, as far as I can tell.

> Thanks -- John

First call the API function FindWindow.  Then, take the handle you get
there and call ShowWindow.  If ShowWindow doesn't work, try
ShowWindowAsync.  I'm not quite sure what the difference between these two
functions is.

Other Threads