-2

I want to have an event in my application if any window appears. For example if i open the windows-explorer then my application should recognise this and can react.

Is this possible in c#?

I already got that i need to override the WndProc-Method. But now i need to know which message appears when a new window is created

Montlebalm
  • 65
  • 7
Tomtom
  • 9,087
  • 7
  • 52
  • 95
  • You mean [`NotifyIcon`](http://msdn.microsoft.com/en-us/library/system.windows.forms.notifyicon.icon.aspx)? – Mr_Green Nov 16 '12 at 06:56
  • I have edited your title. Please see, "[Should questions include “tags” in their titles?](http://meta.stackexchange.com/questions/19190/)", where the consensus is "no, they should not". – John Saunders Nov 16 '12 at 07:10
  • this is probably what you want: http://stackoverflow.com/questions/1986249/c-sharp-process-monitor – cppanda Nov 16 '12 at 07:18
  • Are you trying to write nag-ware or some sort of debugging/analysis tool, or other? You should tell us what you want to achieve. – Christian.K Nov 16 '12 at 07:50

1 Answers1

0

The Window message you are looking for is is WM_ACTIVATEAPP. See http://msdn.microsoft.com/en-us/library/ms632614(v=vs.85).aspx

rro
  • 619
  • 5
  • 22