Restored from previous forum. Originally posted by CONVERT.
Hello,
If I do not code the following lines
-----------------
For ireply = 1 To 12
Event = WindowEvent()
Delay (500)
Next ireply
-----------------
in the little program below, only a grey window is displayed without the text.
Is there any explanation?
Thanks,
(PB 3.62, and Windows 98 SE)
--------------------------
; open a splash Windows
If OpenWindow(0, 100, 100, 500, 400, #PB_Window_ScreenCentered, "Splash test") = 0
MessageRequester("","Unable to open Windows",0)
End
EndIf
If CreateGadgetList(WindowID()) = 0
MessageRequester("","Unable to create gadget list",0)
End
EndIf
For igadget = 1 To 10
TextGadget(igadget, 10, igadget * 30, 80, 20, "Lign " + Str(igadget), #PB_Text_Center)
Next igadget
delay(2000)
; if the following lines are not coded, the text is not displayed.
; -------------------------------
For ireply = 1 To 12
Event = WindowEvent()
Delay (500)
Next ireply
; -------------------------------
CloseWindow(0)
Delay (1000)
MessageRequester("","It is the end",0)
End
----------------------------------
Thanks,
Jean, France.
WindowEvent to display window
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Kale.
try this:
--Kale
In love with PureBasic!
try this:
Code: Select all
#TIME_TO_DISPLAY = 2000 ; milliseconds
starttime.l = gettickcount_()
If OpenWindow(0, 100, 100, 500, 400, #PB_Window_ScreenCentered | #PB_Window_BorderLess, "Splash test") = 0
MessageRequester("","Unable to open Windows",0)
End
EndIf
If CreateGadgetList(WindowID()) = 0
MessageRequester("","Unable to create gadget list",0)
End
EndIf
For igadget = 1 To 10
TextGadget(igadget, 10, igadget * 30, 80, 20, "Lign " + Str(igadget), #PB_Text_Center)
Next igadget
Repeat
If gettickcount_() > starttime + #TIME_TO_DISPLAY
quit = 1
EndIf
Until quit = 1
MessageRequester("","It is the end",0)
End
In love with PureBasic!
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm