Solved

find handle of foreground window

Posted on 2007-12-01
4
236 Views
Last Modified: 2010-05-18
the frontmost notepad, for instance.
0
Comment
Question by:Troudeloup
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:josgood
ID: 20390074
In Windows, the GetForeGroundWindow API function will do the trick.  See
   http://msdn2.microsoft.com/en-us/library/ms633505.aspx
0
 

Author Comment

by:Troudeloup
ID: 20390094
how do I use the api in python?
0
 
LVL 13

Accepted Solution

by:
josgood earned 500 total points
ID: 20390105
I don't know python, so take this with a grain of salt, but a Google search leads me to believe
   win32gui.GetForegroundWindow()
is the way you do it.

Does that make sense or am I hopelessly out in left field?
0
 

Author Comment

by:Troudeloup
ID: 20390124
i think you provided a vital pointer.

i didin't know python can do that  O_o

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Quicksort a dynamic deque 33 79
ASP.net build a IF/Then Walkthrough Guide 1 278
VS2015 compilation and missing DLLs 9 181
c++, dynamic object by json 1 60
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

713 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