+ Reply to Thread
Results 1 to 4 of 4

How to know what the active window is?

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    How to know what the active window is?

    Hi there!

    How can you tell which programs have a visible window?
    So, how can a macro tell what window is the active
    window (has current focus) and how to tell all other
    running programs that one (the pc user) could
    choose with ALT-TAB?

    Thank you in advance

    Regards
    keymuu

  2. #2
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: How to know what the active window is?

    Hi again!

    It is not so difficult to list all processes,
    so is there a way then to know what processes have a visible window?

    regards
    keymuu

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: How to know what the active window is?

    Hello!

    When you hit Alt + TAB you get the list of visible windows.
    The question now: How do Alt-TAB do it, what API calls are involved?
    If you know it please share that info.

    regards
    keymuu

  4. #4
    Registered User
    Join Date
    11-01-2012
    Location
    helsinki, finland
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: How to know what the active window is?

    Hi.

    if you have listed all processes like this:
    Please Login or Register  to view this content.
    then how can you tell (maybe you can ;-), but how could a VBA macro pick those with an own visible (or perhaps minimized) windows.
    How could a macro do this, list all visible windows?

    If you press once Alt-TAB you would get Notepad (as an example), you would see that with your own eyes and hence could be sure it is it.
    How could a macro be sure there is Notepad (or what ever you have preferred) at the top, i.e. has the focus?

    All comments would be highly appreciated, please help if you can.

    regards
    keymuu

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1