Thanks,
Mike
Code: Select all
If OpenWindow(0, 0, 0, 640, 480, "WindowOutput Example...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ButtonGadget(1, (640 - 200) / 2, (480 - 30) - 10, 200, 30, "Draw on Window")
Repeat
E = WaitWindowEvent()
Select E
Case #PB_Event_Gadget
Select EventGadget()
Case 1
If StartDrawing(WindowOutput(0))
Box(100, 100, 100, 100, RGB(255, 0, 0))
StopDrawing()
EndIf
EndSelect
EndSelect
Until E = #PB_Event3D_CloseWindow
EndIf

