Kwain ... machin truc chose

Ce que j'ai pu voir ne me satisfaisait pas, j'ai réussi à pondre le code qui suit et qui me semble mieux répondre au problème.
Merci de me faire remonter les problèmes si vous en rencontrez !
Code : Tout sélectionner
Enumeration
#Win0 : #Win1 : #BP0 : #Image0
EndEnumeration
ExamineDesktops()
res= keybd_event_( #VK_SNAPSHOT,0,#KEYEVENTF_EXTENDEDKEY,0 )
res= keybd_event_( #VK_SNAPSHOT,0,#KEYEVENTF_KEYUP,0 )
CreateImage(#Image0, DesktopWidth(0),DesktopHeight(0))
GetClipboardImage(#Image0)
Procedure Fond(Win,Ima)
Fond.LOGBRUSH\lbStyle=3 : Fond\lbColor=0 : Fond\lbHatch=ImageID(Ima)
SetClassLong_(WindowID(Win),-10,CreateBrushIndirect_(Fond))
EndProcedure
Procedure Open_Window_0()
OpenWindow(#Win0,0, 0, DesktopWidth(0),DesktopHeight(0), "Image", #PB_Window_BorderLess )
Fond(#Win0,#Image0)
OpenWindow(#Win1,50,50, 300,300, "Fenêtre Modale", #PB_Window_TitleBar |#PB_Window_ScreenCentered )
CreateGadgetList(WindowID(#Win1))
ButtonGadget(#BP0, 200, 120, 90, 30, "Terminer")
StickyWindow(#Win0,1)
DisableWindow(#Win0,1)
StickyWindow(#Win0,0)
StickyWindow(#Win1,1)
EndProcedure
Open_Window_0()
Repeat
Event = WaitWindowEvent()
GadgetID = EventGadget()
If Event = #PB_Event_Gadget
If GadgetID = #BP0
End
EndIf
EndIf
Until Event = #PB_Event_CloseWindow
End