If no event is available, PeekEvent returns 0. Unlike WaitEvent if no events are available, control is returned immediately to your program.
Note that PeekEvent event does not update the other event functions such as EventID or EventData. PeekEvent does NOT clear the event queue, so you must call FlushEvents after dealing with the event in order to process any further events.
See also: FlushEvents, WaitEvent.
; create a basic window to play with
button=CreateButton("Hit me! I do nothing!",10,10,180,20,win)
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 ; bye!
BlitzPlus Manual Forum
Blitz3D Equivalent Command
| Blitz BASIC Founders Fund || |