hooking other applications messages Challenge

Hi

Hi i want to know when user changed the foreground Window ..

So i want soemthing like a callback.. that will call me when windows is about to send a message to application that she now has focus..

Any ideea Any function to interop with or.. Please help guys!

btw.. not threads allowed .



Answer this question

hooking other applications messages Challenge

  • Jamin Mace

    so will you share one method of doing this..

  • Salah_SQL

    You want to know when the foreground windows changes What do you main, do you main a other window got focus


  • ubergeek2

    Oke, i understand that point. Why do you need it, because there are a lot of ways to do this.


  • ansaria

    i neeed to make my costum explorer(status bar).. to show all programs in it and show what app the user is working on


  • Dominic99

    Check the following article about how to set hooks, you can hook the WH_SHELL and just filter out the message you want. As cablehead says, for you it would be WM_ACTIVATE.

    Windows Hooks in the .NET Framework.


  • Rieekan

    Check into WH_SHELL ...hook.

    WM_ACTIVATE.



  • Jeremy51

    hey like i said i dont want to use threads.. i just want to recive notice when window is changing


  • spnz

    You can use the GetForegroundWindow to get the handle of the window wich the user is currently working in.

    If you check this with an interval, you can react on changes.


  • Dave Beer

    yes like when a user switches a window .. i want to be noticed too..

    Can that be done



  • hooking other applications messages Challenge