EnableExplicit CreateImage(1,100,100,32) If StartDrawing(ImageOutput(1)) Box(0,0,100,100,GetSysColor_(#COLOR_3DDKSHADOW)) StopDrawing() EndIf If OpenWindow(0,0,0,500,250,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered) ImageGadget(1,10,10,0,0,ImageID(1),0) Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow EndIf