Cavok Posted June 20, 2007 Posted June 20, 2007 I am looking for a way to check which taskbar button is pressed(active) so that I can see which application is currently in use by the user. Checking for the active window is not possible in my situation as the main window of my application has child windows and when one of these are active the main window is deactivated..... I could not find a usuable function in the documentation but I am sure there must be a way to read the taskbar buttons. Someone with a solution??
MisterBates Posted June 20, 2007 Posted June 20, 2007 I am looking for a way to check which taskbar button is pressed(active) so that I can see which application is currently in use by the user. Checking for the active window is not possible in my situation as the main window of my application has child windows and when one of these are active the main window is deactivated.....I could not find a usuable function in the documentation but I am sure there must be a way to read the taskbar buttons. Someone with a solution??I've not tested this, but WinSearchChildren option may make it so that WinGetTitle("") returns active main or child window (whichever is active). [u]MisterBates[/u]_____________________________________________________Suspend/Resume Windows ScreensaverWatchWindows - Window watcher/loggerUDF: Click systray menu/submenu itemsUDF: Outlook Express Folder/Message handling (+ example code)HowTo: Multiple icons in one compiled script
Cavok Posted June 21, 2007 Author Posted June 21, 2007 I've solved the problem by using the GetAncestor() function from user32.dll. This way, if one of the child windows is active I could find the top-level window of the active application.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now