Jump to content

Check if any other window is blocking my window/control


philpw99
 Share

Recommended Posts

Just had to program to make sure one of my control is visible and not blocked by any other window. Seems quite a useful feature for others.

This script comes with 2 functions: WinIsBlocked($hwnd) and WinControlIsBlocked($hwnd, $controlid). They will return true if another visible window is on top of them, covering even a tiny portion of them.

qUsvef5.png

 

In the above example, when run WinIsBlocked( $hAutoItHelp ), it will return true, because the "AutoIt Window Info" is blocking it.

But when run WinControlIsBlocked( $hAutoItHelp, "Internet Explorer_Server1" ), it will return false, because the "AutoIt Window Info" is not blocking the right panel.

I know my code is pretty rough. Please let me know any suggestions and ways to improve it. Thank you !

WinIsBlocked.au3

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...