示例#1
0
 /// <summary>
 /// Flashes window if its not foreground - until it is foreground
 /// </summary>
 protected void FlashWindow()
 {
     if (!Focused || !Visible || WindowState == FormWindowState.Minimized)
     {
         Visible = true;
         var info = new WindowsApi.FLASHWINFO();
         info.hwnd    = Program.FormMain.Handle;
         info.dwFlags = 0x0000000C | 0x00000003;                 // flash all until foreground
         info.cbSize  = Convert.ToUInt32(Marshal.SizeOf(info));
         WindowsApi.FlashWindowEx(ref info);
     }
 }
示例#2
0
 /// <summary>
 ///     Flashes window if its not foreground - until it is foreground
 /// </summary>
 protected void FlashWindow()
 {
     if (!Focused || !Visible || WindowState == FormWindowState.Minimized)
     {
         Visible = true;
         if (Environment.OSVersion.Platform != PlatformID.Unix)
         {
             // todo implement for linux with #define NET_WM_STATE_DEMANDS_ATTENTION=42
             var info = new WindowsApi.FLASHWINFO();
             info.hwnd    = Handle;
             info.dwFlags = 0x0000000C | 0x00000003; // flash all until foreground
             info.cbSize  = Convert.ToUInt32(Marshal.SizeOf(info));
             WindowsApi.FlashWindowEx(ref info);
         }
     }
 }
 /// <summary>
 /// Flashes window if its not foreground - until it is foreground
 /// </summary>
 protected void FlashWindow() {
     if (!Focused || !Visible || WindowState == FormWindowState.Minimized) {
         Visible = true;
         if (Environment.OSVersion.Platform != PlatformID.Unix) {
             // todo implement for linux with #define NET_WM_STATE_DEMANDS_ATTENTION=42
             var info = new WindowsApi.FLASHWINFO();
             info.hwnd = Handle;
             info.dwFlags = 0x0000000C | 0x00000003; // flash all until foreground
             info.cbSize = Convert.ToUInt32(Marshal.SizeOf(info));
             WindowsApi.FlashWindowEx(ref info);
         }
     }
 }
		/// <summary>
		/// Flashes window if its not foreground - until it is foreground
		/// </summary>
		protected void FlashWindow()
		{
			if (!Focused || !Visible || WindowState == FormWindowState.Minimized)
			{
				Visible = true;
				var info = new WindowsApi.FLASHWINFO();
				info.hwnd = Program.FormMain.Handle;
				info.dwFlags = 0x0000000C | 0x00000003; // flash all until foreground
				info.cbSize = Convert.ToUInt32(Marshal.SizeOf(info));
				WindowsApi.FlashWindowEx(ref info);
			}
		}