id - An integer event identifier |
Flushes (discards) all incoming events with the specified id.
This can be useful for applications that use timers and don't want to be 'flooded' by timer events on slower machines. See also: PeekEvent, WaitEvent. |
; create a basic window to play with
win=CreateWindow("PeekEvent Example",100,100,200,200,0,49) button=CreateButton("Hit me! I do nothing!",10,10,180,20,win) Repeat id=PeekEvent() ; are there any events waiting to be processed? If id<>0 Then If id=$803 Then Exit ; exit on window close FlushEvents() ; clear out any remaining events End If VWait Forever End ; bye! |