Aidez moi sa me ****.

Code : Tout sélectionner
Enumeration
#Window_Main
#Image
#Gadget_Image
EndEnumeration
WindowWidth = 640
WindowHeight = 480
ImageWidth = WindowWidth
ImageHeight = WindowHeight
If OpenWindow(#Window_Main, 0, 0, WindowWidth, WindowHeight, #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered, "MyWindow")
AddKeyboardShortcut(#Window_Main, #PB_Shortcut_Escape, #PB_Shortcut_Escape)
ImageID = CreateImage(#Image, ImageWidth, ImageHeight)
StartDrawing(ImageOutput())
Box(0, 0, WindowWidth, WindowHeight, #Blue)
DrawingMode(1)
Locate(10, 10)
DrawText("This is an image")
StopDrawing()
If CreateGadgetList(WindowID(#Window_Main))
ImageGadget(#Gadget_Image, 0, 0, WindowWidth, WindowHeight, ImageID)
EndIf
Quit = #False
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Quit = #True
Case #PB_Event_Menu
Select EventMenuID()
Case #PB_Shortcut_Escape
Quit = #True
EndSelect
EndSelect
Until Quit
EndIf
End