Results 1 to 3 of 3

Thread: How to check if another application is running?

  1. #1

    Thread Starter
    Addicted Member Xdream's Avatar
    Join Date
    Mar 2001
    Location
    Switzerland
    Posts
    194

    Question

    I've got the following problem: I want my program to check if Internet Explorer is running or not. I'm using this code:

    If FindWindowEx(0, 0, "IEFrame", vbNullString) Or FindWindowEx(0, 0, "CabinetWClass", vbNullString) Then
    '...
    end if

    "CabinetWClass" is used to check if a new browser window is opened by clicking 'open frame in new window' because it won't have the usual class name "IEFrame".

    But now: If the user opens any folder in a window, this window has the same class name as the new IE window.

    Is there another way to check if IE is running or not?

    Thanks a lot!

  2. #2
    Guest
    When does IE ever get the class name of CabinetWClass? This is the class for Windows Explorer, not Internet Explorer.

  3. #3

    Thread Starter
    Addicted Member Xdream's Avatar
    Join Date
    Mar 2001
    Location
    Switzerland
    Posts
    194
    You can open the browser by dblclicking on the icon of IE and then it gets the class name (as you told me) "IEFrame" and that's ok!
    But then, I opened a new browser by rightclicking on a link and use "Open frame in new window" or "file/new/window". Later, I closed the first window (opened by the icon) and my program told me, that IE is no longer running and I still had the 2nd browser window open.

    That was my first problem, so I used a spy program and that told me the class name of the 2nd window as "CabinetWClass". Well, as you see in the code, I'm using both now, and it works really fine for IE, but then I got the new problem with the folder windows.
    By the way, I'm using IE 5.0

    I've no idea how to go on, now.

Posting Permissions

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



Click Here to Expand Forum to Full Width