// handle the ACTIVATE hook event private void HandleActivateEvent(IntPtr wParam, IntPtr lParam) { if (WindowActivate != null) { CbtEventArgs e = new CbtEventArgs(wParam, lParam); WindowActivate(this, e); } }
// handle the DESTROYWND hook event private void HandleDestroyWndEvent(IntPtr wParam, IntPtr lParam) { if (WindowDestroye != null) { CbtEventArgs e = new CbtEventArgs(wParam, lParam); WindowDestroye(this, e); } }