色变化
附2小段代码:
[System.Runtime.InteropServices.DllImport(
"user32.dll"
)]
static
extern
int
FlashWindow (
int
hwnd,
int
bInvert);
private
void
button1_Click(
object
sender, System.EventArgs e)
{
FlashWindow(
this
.Handle.ToInt32(),1);
// 参数为1时启动闪烁, 参数为0时停止闪烁
}
[System.Runtime.InteropServices.DllImport(
"user32.dll"
)]
public
static
extern
bool
FlashWindow(
IntPtr hWnd,
// handle to window
bool
bInvert
// flash status
);
private
void
button1_Click(
object
sender, EventArgs e)
{
FlashWindow(
this
.Handle,