本文整理汇总了C#中FLASHWINFO类的典型用法代码示例。如果您正苦于以下问题:C# FLASHWINFO类的具体用法?C# FLASHWINFO怎么用?C# FLASHWINFO使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FLASHWINFO类属于命名空间,在下文中一共展示了FLASHWINFO类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Create_FLASHWINFO
private static FLASHWINFO Create_FLASHWINFO(IntPtr handle, uint flags, uint count, uint timeout) {
FLASHWINFO fi = new FLASHWINFO();
fi.cbSize = Convert.ToUInt32(Marshal.SizeOf(fi));
fi.hwnd = handle;
fi.dwFlags = flags;
fi.uCount = count;
fi.dwTimeout = timeout;
return fi;
}
示例2: flashTaskBar
public static bool flashTaskBar(IntPtr hWnd, falshType type)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.hwnd = hWnd;
fInfo.dwFlags = (uint)type;
fInfo.uCount = Convert.ToUInt32(5);
fInfo.dwTimeout = 1000; //窗口闪烁的频度,毫秒为单位;若该值为0,则为默认图标的闪烁频度
return FlashWindowEx(ref fInfo);
}
示例3: FlashWindowStop
public static int FlashWindowStop(System.Windows.Forms.Form hWnd)
{
FLASHWINFO fw = new FLASHWINFO();
fw.cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO)));
fw.hwnd = hWnd.Handle;
fw.dwFlags = (Int32)( FLASHWINFOFLAGS.FLASHW_STOP);
fw.dwTimeout = 0;
return FlashWindowEx(ref fw);
}
示例4: FlashWindow
/// <summary>
/// 指定されたウィンドウを点滅する
/// </summary>
/// <param name="iHandle">ウィンドウハンドル</param>
/// <param name="iFlashMode">点滅モード</param>
/// <param name="iFlashCount">点滅回数</param>
public static void FlashWindow(IntPtr iHandle, UInt32 iFlashMode = FLASHW_ALL, uint iFlashCount = 5)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.hwnd = iHandle;
fInfo.dwFlags = iFlashMode;
fInfo.uCount = iFlashCount; // 点滅する回数
fInfo.dwTimeout = 0;
FlashWindowEx(ref fInfo);
}
示例5: Flash
public static void Flash(Form mainForm)
{
FLASHWINFO fw = new FLASHWINFO();
fw.cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO)));
fw.hwnd = mainForm.Handle;
// Flash both the window caption and the taskbar button until the window comes to the foreground
fw.dwFlags = (Int32)(FLASHWINFOFLAGS.FLASHW_ALL | FLASHWINFOFLAGS.FLASHW_TIMERNOFG);
fw.dwTimeout = 0;
FlashWindowEx(ref fw);
}
示例6: StopFlashingWindow
public static void StopFlashingWindow(Form win)
{
FLASHWINFO info = new FLASHWINFO();
info.hwnd = win.Handle;
info.cbSize = Convert.ToUInt32(Marshal.SizeOf(info));
info.dwFlags = FLASHW_STOP;
info.uCount = UInt32.MaxValue;
info.dwTimeout = 0;
FlashWindowEx(ref info);
}
示例7: StopFlashing
public static void StopFlashing(this Window win)
{
WindowInteropHelper h = new WindowInteropHelper(win);
FLASHWINFO info = new FLASHWINFO();
info.hwnd = h.Handle;
info.dwFlags = FLASHW_STOP;
info.uCount = uint.MaxValue;
info.dwTimeout = 0;
info.cbSize = (sizeof(uint) * 4) + (uint)IntPtr.Size;
FlashWindowEx(ref info);
}
示例8: FlashWindow
public bool FlashWindow()
{
FLASHWINFO fw = new FLASHWINFO();
fw.cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO)));
fw.hwnd = this.Handle;
fw.dwFlags = 0xf;
fw.uCount = UInt32.MaxValue;
return FlashWindowEx(ref fw);
}
示例9: InternalFlash
private static void InternalFlash(Form form, FlashFlags flags)
{
FLASHWINFO fw = new FLASHWINFO
{
cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO))),
hwnd = form.Handle,
dwFlags = (int)flags,
uCount = uint.MaxValue
};
FlashWindowEx(ref fw);
}
示例10: Stop
public static void Stop(Window win)
{
WindowInteropHelper h = new WindowInteropHelper(win);
FLASHWINFO info = new FLASHWINFO();
info.hwnd = h.Handle;
info.cbSize = Convert.ToUInt32(Marshal.SizeOf(info));
info.dwFlags = FLASHW_STOP;
info.uCount = UInt32.MaxValue;
info.dwTimeout = 0;
FlashWindowEx(ref info);
}
示例11: Flash
public void Flash()
{
var info = new FLASHWINFO
{
cbSize = (uint) Marshal.SizeOf(typeof (FLASHWINFO)),
hwnd = new WindowInteropHelper(Application.Current.MainWindow).Handle,
dwFlags = (int) (FLASHWINFOFLAGS.FLASHW_ALL | FLASHWINFOFLAGS.FLASHW_TIMERNOFG),
dwTimeout = 0
};
FlashWindowEx(ref info);
}
示例12: FlashConsoleWindow
private static void FlashConsoleWindow(IntPtr hWnd)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.hwnd = hWnd;
fInfo.dwFlags = FLASHW_ALL;
fInfo.uCount = flashCount; // UInt32.MaxValue;
fInfo.dwTimeout = 0;
FlashWindowEx(ref fInfo);
}
示例13: StopFlashingWindow
public static void StopFlashingWindow(this Window win)
{
var h = new WindowInteropHelper(win);
var info = new FLASHWINFO { hwnd = h.Handle };
info.cbSize = Convert.ToUInt32(Marshal.SizeOf(info));
info.dwFlags = FLASHW_STOP;
info.uCount = uint.MaxValue;
info.dwTimeout = 0;
FlashWindowEx(ref info);
}
示例14: FlashWindow
/// <summary>
/// Flashes the window the specified number of times.
/// </summary>
/// <remarks>
/// http://stackoverflow.com/questions/73162/how-to-make-the-taskbar-blink-my-application-like-messenger-does-when-a-new-messa
/// </remarks>
/// <param name="numberOfTimes">Number of times to flash the window.</param>
/// <returns>The return value specifies the window's state before the call to the FlashWindowEx function.
/// If the window caption was drawn as active before the call, the return value is true. Otherwise,
/// the return value is zero.</returns>
private bool FlashWindow(int numberOfTimes)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = Convert.ToUInt32(Marshal.SizeOf(fInfo));
fInfo.hwnd = Bot.ConsoleWindow;
fInfo.dwFlags = FLASHW_ALL;
fInfo.uCount = Convert.ToUInt32(numberOfTimes);
fInfo.dwTimeout = 0;
return FlashWindowEx(ref fInfo);
}
示例15: FlashWindowEx
/// <summary>
/// Flashes a window
/// </summary>
/// <param name="hWnd">The handle to the window to flash</param>
/// <returns>whether or not the window needed flashing</returns>
public static bool FlashWindowEx(IntPtr hWnd, UInt32 flag)
{
FLASHWINFO fInfo = new FLASHWINFO();
fInfo.cbSize = (ushort)Marshal.SizeOf(fInfo);
fInfo.hwnd = hWnd;
fInfo.dwFlags = flag;
fInfo.uCount = UInt16.MaxValue;
fInfo.dwTimeout = 0;
return (FlashWindowEx(ref fInfo) == 0);
}