Link to home
Start Free TrialLog in
Avatar of muk
muk

asked on

How to set active application?

How I can change active application using API?
For example, to set my programm active.
Or to set other application active if I have it's HINSTANCE.
ASKER CERTIFIED SOLUTION
Avatar of jsexton
jsexton

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of muk
muk

ASKER

What is a function SwitchToHandle()? Its not API. Have you a sample code?
I'm sorry muk, I meant SetForegroundWindow (it is API) instead of SwitchToHandle:  

//bring delphi app to front:
    SetForegroundWindow(Application.Handle);

you can still use FindWindow to get the window handle of another application.

Cheers!