Event Questions

BlitzPlus Forums/BlitzPlus Beginners Area/Event Questions

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Global window% = CreateWindow()

Repeat
   Events()
Forever

Function Events(wait% = 10)
   Select WaitEvent(wait%)
      Case $401 ; Gadget has been pressed/modified
         Select EventSource()
            case button%; Your gadgets (buttons etc)
         End Select
      Case $803 ; X button has been pressed
         Select EventSource()
            Case window%
               FreeGadget window%
               End
            Default
               FreeGadget ActiveWindow()
         End Select
   End Select
End Function