Struct FLASHWINFO UInteger cbSize Handle hWnd DWord dwFlags UInteger uCount DWord dwTimeout End_Struct External_Function FlashWindowEx "FlashWindowEx" User32.dll ; Pointer pfwi ; // A pointer to a FLASHWINFO structure. Returns Boolean Define FLASHW_ALL for |CI$03 // Flash both the window caption and taskbar button. This is equivalent to setting the FLASHW_CAPTION | FLASHW_TRAY flags. Define FLASHW_CAPTION for |CI$01 // Flash the window caption. Define FLASHW_STOP for |CI$00 // Stop flashing. The system restores the window to its original state. Define FLASHW_TIMER for |CI$04 // Flash continuously, Until the FLASHW_STOP flag is Set. Define FLASHW_TIMERNOFG for |CI$0C // Flash continuously Until the window comes to the foreground. Define FLASHW_TRAY for |CI$02 // Flash a window. // Returns the window's state before the call. Function FlashWindow Desktop Handle hWindow Integer iFlags Integer iCount Integer iTimeout Returns Boolean FLASHWINFO lsFlashWInfo Boolean bActiveStateBeforeCall Move (SizeOfType(FLASHWINFO)) to lsFlashWInfo.cbSize Move hWindow to lsFlashWInfo.hWnd Move iFlags to lsFlashWInfo.dwFlags Move iCount to lsFlashWInfo.uCount Move iTimeout to lsFlashWInfo.dwTimeout Move (FlashWindowEx(AddressOf(lsFlashWInfo))) to bActiveStateBeforeCall Function_Return bActiveStateBeforeCall End_Function // Flash the current application until it is activated. Procedure DoFlashApplicationUntilActivated Desktop Handle hWindow hMainWindow Boolean bActiveState Get Main_Window to hMainWindow Get Window_Handle of hMainWindow to hWindow If (hWindow = 0) Procedure_Return Get FlashWindow hWindow (FLASHW_ALL + FLASHW_TIMERNOFG) 0 0 to bActiveState End_Procedure // Stop flashing the current application. Procedure DoStopFlashApplication Desktop Handle hWindow hMainWindow Boolean bActiveState Get Main_Window to hMainWindow Get Window_Handle of hMainWindow to hWindow If (hWindow = 0) Procedure_Return Get FlashWindow hWindow FLASHW_STOP 0 0 to bActiveState End_Procedure