Code: Select all
OpenWindow(0, 0, 0, 210, 30, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ShortcutGadget(0, 5, 5, 200, 20, 0)
SetGadgetState(0, #PB_Shortcut_Up)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code: Select all
OpenWindow(0, 0, 0, 210, 30, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ShortcutGadget(0, 5, 5, 200, 20, 0)
SetGadgetState(0, #PB_Shortcut_Up)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code: Select all
OpenWindow(0, 0, 0, 210, 30, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
ShortcutGadget(0, 5, 5, 200, 20, 0)
s = #PB_Shortcut_Pad8
SetGadgetState(0, s)
Debug "Should be " + Str(s) + ": " + Str(GetGadgetState(0))
s = #VK_UP ; Windows constant equal to PB constant
SetGadgetState(0, s)
Debug "Should be " + Str(s) + ": " + Str(GetGadgetState(0))
s = #PB_Shortcut_Up
SetGadgetState(0, s)
Debug "Should be " + Str(s) + ": " + Str(GetGadgetState(0))
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Code: Select all
If OpenWindow(0, 0, 0, 240, 170, "ShortcutGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ShortcutGadget(0, 20, 20, 200, 25, #PB_Shortcut_Up)
*hwndHot = CreateWindowEx_(0, #HOTKEY_CLASS, #Null, #WS_CHILD | #WS_VISIBLE, 20, 60, 200, 20, WindowID(0), #Null, GetModuleHandle_(#Null), #Null)
SendMessage_(*hwndHot, #HKM_SETHOTKEY, #VK_UP, 0)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
CloseWindow_(*hwndHot)
EndIf
Code: Select all
If OpenWindow(0, 0, 0, 240, 170, "ShortcutGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ShortcutGadget(0, 20, 20, 200, 25, #PB_Shortcut_Delete)
*hwndHot = CreateWindowEx_(0, #HOTKEY_CLASS, #Null, #WS_CHILD | #WS_VISIBLE, 20, 60, 200, 20, WindowID(0), #Null, GetModuleHandle_(#Null), #Null)
SendMessage_(*hwndHot, #HKM_SETHOTKEY, #VK_DELETE, 0)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
CloseWindow_(*hwndHot)
EndIf