Jump to content

WinActivate doesn't mean Window is Forefront?

Recommended Posts

I am having a bit of a problem. I am writing a script where the user just need to stare at and watch what the script does un-interrupted and have full view of what is going on. There is a case where a "Chat" Window will pop up and block the view. This chat Windows is evil. I can not push it to the background and WinActivate will not bring my Window to the foreground.

I was mistakenly under the impression that when I did a WinActivate and it was a success that my Window would be in front. Not the case. My Window is active but this bleeding chat windows is in front.

How can I tell if another Windows has popped up in front of mine and how can I get the handle to it so I can close it?

Here is the documemtation on WinActivate and it is exactly what is happening:


You can use the WinActive function to check if WinActivate succeeded. If multiple windows match the criteria, the window that was most recently active is the one activated. WinActivate works on minimized windows. However, a window that is "Always On Top" could still cover up a window you Activated.

Edited by ZiggyStardust
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...