Advertisement
anatolt

esc v1 (without case)

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