예제 #1
0
 private static IntPtr HwndHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
 {
     if (wParam == Constants.HSHELL_FLASH)
     {
         TaskbarFlash.Stop(lParam);
         handled = true;
     }
     return(IntPtr.Zero);
 }
예제 #2
0
        private void Spawn_SourceInitialized(object sender, EventArgs e)
        {
            Window other = (Window)sender;

            other.SourceInitialized -= this.Spawn_SourceInitialized;
            this.Dispatcher.InvokeAsync(() =>
            {
                this.Activate();
                this.Focus();
                TaskbarFlash.Flash(new WindowInteropHelper(other).Handle, 8);
            });
        }