Hi guys, and girls...
I have a form (not mainform, at least I think that way) that I show from a class.
This form is set transparent, as it is to be used as a Splash Screen...
my AppStart is as follows:
And my Splash Screen is Initialized as follows:
Then, My StartIntro/EndIntro Subs are simple calls to...
Everything works as presumed except that the SplashScr Form is not Closed... as it is transparent I don't see it, but its still present in the taskbar, along with MainForm.
Why?
I have a form (not mainform, at least I think that way) that I show from a class.
This form is set transparent, as it is to be used as a Splash Screen...
my AppStart is as follows:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Wait For (StartIntro(SplashScrFadeInDurantion)) complete (result As Boolean)
'I can do stuff here
Wait For (EndIntro(SplashScrFadeOutDurantion)) complete (result As Boolean)
Dim PagesManager As B4XPagesManager
PagesManager.Initialize(MainForm)
End Sub
And my Splash Screen is Initialized as follows:
B4X:
Public Sub Initialize
Dim mWidth As Double = fx.PrimaryScreen.MaxX
Dim mHeight As Double = fx.PrimaryScreen.MaxY
SplashScr.Initialize("SplashScreen", mWidth, mHeight)
SplashScr.SetFormStyle("TRANSPARENT")
SplashScr.BackColor = fx.Colors.Transparent
SplashScr.RootPane.LoadLayout("splash")
End Sub
Then, My StartIntro/EndIntro Subs are simple calls to...
B4X:
Public Sub ShowSplashScreen(FadeIn As Boolean, Duration As Int)
If FadeIn = True Then
SplashScr.RootPane.Alpha = 0
SplashScr.Show
SplashScr.RootPane.SetAlphaAnimated(Duration, 1.0)
Else
SplashScr.Show
End If
End Sub
Public Sub HideSplashScreen(FadeOut As Boolean, Duration As Int)
If FadeOut = True Then
Dim p As Pane = SplashScr.RootPane
p.SetAlphaAnimated(Duration, 0)
Wait For P_AnimationCompleted
End If
SplashScr.Close
End Sub
Everything works as presumed except that the SplashScr Form is not Closed... as it is transparent I don't see it, but its still present in the taskbar, along with MainForm.
Why?