Page 1 of 1
Taskbar flashing
Posted: Sun Dec 12, 2004 1:47 pm
by Killswitch
On a lot of the programs that I use on my computer they have a neat little way of attracting your attention to the fact that they require some input or interaction - the button in the task bar flashes.
Is there anyway to achieve this effect using PB or API commands?
Posted: Sun Dec 12, 2004 1:58 pm
by DarkDragon
Code: Select all
#WindowWidth = 640
#WindowHeight = 480
#WindowFlags = #PB_Window_SizeGadget | #PB_Window_MaximizeGadget | #PB_Window_MinimizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered | #PB_Window_SystemMenu
hWnd = OpenWindow(0, 0, 0, #WindowWidth, #WindowHeight, #WindowFlags, "")
ShowWindow_(hWnd, #SW_MINIMIZE)
StartTime = ElapsedMilliseconds()
s = 1
While m < 5
CurrentTime = ElapsedMilliseconds()
If CurrentTime-StartTime > 1000
FlashWindow_(hWnd, s) ;Look in the W32 Helpfile or in the API Guide
If s = 0 : s = 1 : Else : s = 0 : EndIf
m + 1
StartTime = CurrentTime
EndIf
Event = WindowEvent()
Wend
Repeat
Event = WindowEvent()
Delay(10)
Until Event = #PB_Event_CloseWindow
End