voila je cherche le moyen de fermer une fenetre normale avec le boutton échappe du clavier mais si je ne suis pas dans un screen je n'arrive pas a utilisé le clavier donc je souhaiterais saoir si c'est possible .
;- Window Constants
Enumeration
#Window_0
EndEnumeration
If OpenWindow(#Window_0, 0, 0, 600, 300, "test", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered )
If CreateMenu(0,WindowID(#Window_0)) ;<--------------- on crée un menu est non un gadget ;)
AddKeyboardShortcut(#Window_0, #PB_Shortcut_Escape, 15) ;<-------- on choisis son raccourci et le numero de la case plus bas
EndIf
EndIf
Repeat
EventID = WaitWindowEvent()
If EventID = #PB_Event_Menu
Select EventMenu()
Case 15 ;<--------------- la Case en question
End ;<----------- on quitte le programme
EndSelect
EndIf
Until EventID = #PB_Event_CloseWindow
@++
Windows 10 x64, PureBasic 5.73 x86 & x64
GPU : radeon HD6370M, CPU : p6200 2.13Ghz