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