C#实现任务栏闪烁

黄舟
Lepaskan: 2016-12-21 14:52:01
asal
1707 orang telah melayarinya

PRivate void FlashIt() 

FLASHWINFO fi = new FLASHWINFO(); 
fi.cbSize = (uint)System.Runtime.InteropServices.Marshal.SizeOf(fi); 
fi.hwnd = Handle; 
fi.dwFlags = FLASHW_TRAY; 
fi.uCount = 3; 
fi.dwTimeout = 0; 
FlashWindowEx(ref fi);




[DllImport("user32.dll")] 
[return: MarshalAs(UnmanagedType.Bool)] 
static extern bool FlashWindowEx(ref FLASHWINFO pwfi);

[StructLayout(LayoutKind.Sequential)] 
public struct FLASHWINFO 

public UInt32 cbSize; 
public IntPtr hwnd; 
public UInt32 dwFlags; 
public UInt32 uCount; 
public UInt32 dwTimeout;




//Stop flashing. The system restores the window to its original state. 
public const UInt32 FLASHW_STOP = 0; 
//Flash the window caption. 
public const UInt32 FLASHW_CAPTION = 1; 
//Flash the taskbar button. 
public const UInt32 FLASHW_TRAY = 2; 
//Flash both the window caption and taskbar button. 
//This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags. 
public const UInt32 FLASHW_ALL = 3; 
//Flash continuously, until the FLASHW_STOP flag is set. 
public const UInt32 FLASHW_TIMER = 4; 
//Flash continuously until the window comes to the foreground. 
public const UInt32 FLASHW_TIMERNOFG = 12;

 以上就是C#实现任务栏闪烁的内容,更多相关内容请关注PHP中文网(www.php.cn)! 


Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan