Results 1 to 3 of 3

Thread: getactivewindow

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 1999
    Location
    Fremont, Ca, 94538
    Posts
    40

    Post

    Hi, I'm trying to get the current active window (including all other application's windows). I tried with getactivewindow() but it only works with my application. Are there any other ways to notice the focus on other applications too?

  2. #2
    Addicted Member Razzle's Avatar
    Join Date
    Jan 2000
    Location
    Berlin, Germany
    Posts
    161

    Post

    no surprise you found your program. When it looks for the active window, the program itself IS the active window...

    I'm sure, there was another way. I'll look for it

    ------------------
    Razzle
    ICQ#: 31429438
    What is the difference between a raven?
    -The legs. The length is equal, especially the right one.

  3. #3
    Hyperactive Member
    Join Date
    Jan 1999
    Location
    Rotterdam, Netherlands
    Posts
    386

    Post

    There is no other way. GetActiveWindow returns the hWnd of the active window. And indeed, if you press on a command button to find out the active window, you're app is active.
    You can try it out though using a timer, and the GetWindowText API, check every x-seconds what the active window is, get the windowtext and show it in a msgbox or whatever, you'll see that it works....

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