Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How to set active application?

Posted on 1999-07-18
Medium Priority
Last Modified: 2013-12-29
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.
Question by:muk
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

jsexton earned 400 total points
ID: 1691503
Use FindWindow() to get the program's handle and pass it on to SwitchToHandle().
I have Delphi code for it if you need it.

Author Comment

ID: 1691504
What is a function SwitchToHandle()? Its not API. Have you a sample code?

Expert Comment

ID: 1691505
I'm sorry muk, I meant SetForegroundWindow (it is API) instead of SwitchToHandle:  

//bring delphi app to front:

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


Featured Post

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question