Window creation: Difference between revisions
→{{header|PureBasic}}: expanding the task
m (→{{header|Wren}}: Changed to Wren S/H) |
(→{{header|PureBasic}}: expanding the task) |
||
Line 1,833:
=={{header|PureBasic}}==
<syntaxhighlight lang="purebasic">Define
x = 400
y = 300
If CreateImage(0, x, y) And StartDrawing(ImageOutput(0))
DrawingMode(#PB_2DDrawing_Transparent)
Box(0, 0, x, y, #White)
Repeat▼
DrawText(x/3, y/2, "Hello World!", #Black)
Select Event▼
;DrawText(Random(200), Random(200), "Hello World!", RGB(Random(255), Random(255), Random(255)))
Next i
StopDrawing()
ImageGadget(0, 0, 0, x, y, ImageID(0))
EndIf
▲ Repeat
Event = WaitWindowEvent()
▲ Select Event
Case #PB_Event_Gadget
Case #PB_Event_CloseWindow
EndSelect
ForEver
EndIf</syntaxhighlight>
=={{header|Python}}==
|