Code: Select all
If OpenWindow(0, 0, 0, 200, 200, "", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
;Please try to comment the following 2 lines in and out :
SetWindowColor(0, $368390) ; This command makes "Hello" disappear!? Why?
;ButtonGadget (1, 10, 10, 100, 20, "I will make i work!"); The gadget makes it appear again! But why?
StartDrawing(WindowOutput(0))
DrawText(20,50,"Hello!")
StopDrawing()
Repeat
Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 1
;Do nothing
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow
EndIf