Hi Grisu.
Here is a small sample. Don't know another way to create a splashscreen.
Strict
Local Window:TGadget, ListBox:TGadget
'Build the program hidden
Window = CreateWindow("My program", 100,100,400,400, Null, WINDOW_TITLEBAR|WINDOW_HIDDEN)
ListBox = CreateListBox(0,0,ClientWidth(Window)*0.5, ClientHeight(Window), Window)
For Local i:Int = 0 Until 50
AddGadgetItem(ListBox, "Item "+i)
Next
'Show the splashscreen
SplashScreen("c:\splash.png")
'Show the program
ShowGadget(Window)
Repeat
Select WaitEvent()
Case EVENT_WINDOWCLOSE
End
End Select
Forever
Function SplashScreen(Url:Object, Time:Int=4)
Local Pixmap_Splash:TPixmap
Local Window_Splash:TGadget
Local Splash_X:Int, Splash_Y:Int
Local Panel_Splash:TGadget
Local Timer:TTimer
Pixmap_Splash = LoadPixmap(Url)
Splash_X = ClientWidth(Desktop())*0.5
Splash_X:-PixmapWidth(Pixmap_Splash)*0.5
Splash_Y = ClientHeight(Desktop())*0.5
Splash_Y:-PixmapHeight(Pixmap_Splash)*0.5
Window_Splash = CreateWindow("",Splash_X, Splash_Y,PixmapWidth(Pixmap_Splash), PixmapHeight(Pixmap_Splash) ,Null, 0)
Panel_Splash = CreatePanel(0,0,ClientWidth(Window_Splash), ClientHeight(Window_Splash), Window_Splash)
SetPanelPixmap Panel_Splash, Pixmap_Splash
Timer = CreateTimer(1)
Repeat
Select WaitEvent()
Case EVENT_TIMERTICK
If TimerTicks(Timer)=>Time
Exit
EndIf
End Select
Forever
StopTimer(Timer)
FreeGadget(Window_Splash)
Pixmap_Splash = Null
End Function
Mfg Suco