+ Reply to Thread
Results 1 to 4 of 4

How to know what the active window is?

Hybrid View

  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:
    [System Process]
    AcPrfMgrSvc.exe
    AcSvc.exe
    ACTray.exe
    ACWLIcon.exe
    agent.exe
    alg.exe
    Amsg.exe
    ApplicationUpdater.exe
    AwaySch.EXE
    BTSTAC~1.EXE
    BTTray.exe
    btwdins.exe
    c2c_service.exe
    chrome.exe
    chrome.exe
    chrome.exe
    chrome.exe
    chrome.exe
    concentr.exe
    csrss.exe
    cssauth.exe
    ctfmon.exe
    DkIcon.exe
    DkService.exe
    DLACTRLW.EXE
    DLG.exe
    EvtEng.exe
    EXCEL.EXE
    explorer.exe
    EZEJMNAP.EXE
    GoogleCrashHandler.exe
    GrooveMonitor.exe
    hkcmd.exe
    ibmpmsvc.exe
    iexplore.exe
    iexplore.exe
    igfxext.exe
    igfxpers.exe
    igfxsrvc.exe
    igfxsrvc.exe
    igfxtray.exe
    IPSSVC.EXE
    issch.exe
    ISUSPM.exe
    IUService.exe
    jqs.exe
    Listary.exe
    logmon.exe
    LPMGR.EXE
    lsass.exe
    McSACore.exe
    msiexec.exe
    MsMpEng.exe
    msseces.exe
    notepad.exe
    PresentationFontCache.exe
    RegSrvc.exe
    rrpservice.exe
    rrservice.exe
    rundll32.exe
    rundll32.exe
    S24EvMon.exe
    saUI.exe
    scheduler_proxy.exe
    SearchSettings.exe
    services.exe
    Skype.exe
    smax4pnp.exe
    smss.exe
    softinfo.exe
    spoolsv.exe
    SSScheduler.exe
    SUService.exe
    SvcGuiHlpr.exe
    svchost.exe
    svchost.exe
    svchost.exe
    svchost.exe
    svchost.exe
    svchost.exe
    svchost.exe
    SynTPEnh.exe
    SynTPLpr.exe
    System
    tpfnf7sp.exe
    TPHDEXLG.exe
    TPONSCR.exe
    TPOSDSVC.exe
    TpScrex.exe
    TpShocks.exe
    tvt_reg_monitor_svc.exe
    tvtsched.exe
    tvttcsd.exe
    Updater.exe
    wfcrun32.exe
    winlogon.exe
    WISPTIS.EXE
    wmiapsrv.exe
    wmpnetwk.exe
    wmpnscfg.exe
    wuauclt.exe
    wmiprvse.exe
    MpCmdRun.exe
    MpCmdRun.exe
    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