Advertisement
anatolt

esc v1 case

Jan 27th, 2015
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; esc v1 case
  2. If OpenWindow(0, 200, 200, 200, 120, "Esc")
  3.   If CreatePopupMenu(0)      ; creation of the pop-up menu begins...
  4.     MenuItem(4, "Quit")
  5.   EndIf
  6.   Repeat
  7.     Event = WaitWindowEvent()     ; check for window events
  8.     Select Event
  9.       Case #PB_Event_Menu        ; an item of the popup-menu was clicked
  10.         Select EventMenu()       ; get the clicked menu item...
  11.           Case 4 : End
  12.         EndSelect
  13.     EndSelect
  14.     AddKeyboardShortcut(0, #PB_Shortcut_Escape, 4)      
  15.   Until Event = #PB_Event_CloseWindow
  16. EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement