private static IntPtr ShellProc(int code, IntPtr wParam, IntPtr lParam) { if (code == PI.HSHELL_REDRAW) { try { if (_forms.TryGetValue(wParam, out Form f)) { FlashEvent(f, (int)lParam == 1); } } catch { // } } return(PI.CallNextHookEx(_hHook, code, wParam, lParam)); }