Code: Select all
InitSprite()
OpenWindow(1,200,200,400,400,"pauls program")
ClearScreen(RGB(100,0,0))
FlipBuffers()
Delay(5000)
StartDrawing(WindowOutput(1))
DrawText(10,10,"hello world")
StopDrawing()
FlipBuffers()
Delay(5000)
End
Code: Select all
InitSprite()
OpenWindow(1,200,200,400,400,"pauls program")
ClearScreen(RGB(100,0,0))
FlipBuffers()
Delay(5000)
StartDrawing(WindowOutput(1))
DrawText(10,10,"hello world")
StopDrawing()
FlipBuffers()
Delay(5000)
End
Code: Select all
EnableExplicit
Define Exit.i, Event.i
OpenWindow(0, 200, 200, 400, 400,"pauls program window")
CanvasGadget(0, 0, 0, 400, 400)
If StartDrawing(CanvasOutput(0))
Box(0, 0, 400, 400, #Red)
DrawText(10, 10, "hello world")
StopDrawing()
EndIf
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_CloseWindow
Exit = #True
EndSelect
Until Exit
Exit = #False
InitSprite()
OpenWindow(0, 200, 200, 400, 400,"pauls program screen")
OpenWindowedScreen(WindowID(0), 0, 0, 400, 400)
ClearScreen(#Red)
If StartDrawing(ScreenOutput())
DrawText(10, 10, "hello world")
StopDrawing()
EndIf
Repeat
Repeat
Event = WindowEvent()
Select Event
Case #PB_Event_CloseWindow
Exit = #True
EndSelect
Until Event = 0
FlipBuffers()
Until Exit
No, this turns the window red:pfaber11 wrote:clearscreen(rgb(100,0,0)) should turn the window red
Code: Select all
SetWindowColor(WindowNumber,RGB(100,0,0))