如題,方法為使用winapi來達成
其使用方法如下:
<code>
1.
using System.Runtime.InteropServices;
2.
[DllImport("user32")]
public static extern int FlashWindow(int hwnd, int bInvert);
3.
Form1 childWindow= new new Form1();
4.
for (int i = 0; i < 10; i++)
{
System.Threading.Thread.Sleep(100);
FlashWindow((int)childWindow.Handle, 10);
}
</code>
FlashWindow後面參數只要大於0就會將TaskBar做閃爍特效
FlashWindow((int)childWindow.Handle, 0);
則不會閃爍
全站熱搜