如上图中,我开了5个QQ聊天界面(这里叫做A、B、C、D、E),只要其中一个界面有信息更新,任务栏对应图标就会闪烁。问题:
1、这是怎么做到的?
2、能不能编程做到只让某个闪,其他不让闪?(也就是 比如,我只要 A 在接收新消息时有闪烁,B、C、D、E就算有新消息到来也不闪烁)?

解决方案 »

  1.   

    两种方法
    句柄根据你需要的,自行指定...  FlashWindow(Application.Handle, True);
    FLASHW_STOP = 0      // Stop flashing
    FLASHW_CAPTION = 1   // Flash the window caption
    FLASHW_TRAY = 2      // Flash the taskbar button
    FLASHW_ALL = 3       // Flash both the window caption and taskbar button
    FLASHW_TIMER = 4     // Flash continuously, until the FLASHW_STOP flag is set
    FLASHW_TIMERNOFG = 5 // Flash continuously until the window 
                         // comes to the foreground//闪烁
          FWinfo.cbSize := 20;
          FWinfo.hwnd := Application.Handle;
          FWinfo.dwflags := FLASHW_ALL;
          FWinfo.ucount := 5;//闪烁次数
          FWinfo.dwtimeout := 0;//闪烁频率,0表示按照光标闪烁频率
          FlashWindowEx(FWinfo);
    //停止
          FWinfo.cbSize := 20;
          FWinfo.hwnd := Application.Handle;
          FWinfo.dwflags := FLASHW_STOP;
          FWinfo.ucount := 0;
          FWinfo.dwtimeout := 0;
          FlashWindowEx(FWinfo);