现在的位置: 首页 > 综合 > 正文

FlashWindowEx实现窗口在任务栏闪烁/变化颜色

2013年06月30日 ⁄ 综合 ⁄ 共 608字 ⁄ 字号 评论关闭
色变化

附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, 

抱歉!评论已关闭.