Home All Groups Group Topic Archive Search About
Author
5 Jan 2006 1:08 PM
Mika M
Hi!

My application has Splash Screen, and it is defined as Splash Screen
using VB 2005 way...

Application.myapp SplashScreen>frmSplashScreen</SplashScreen>

Now I have problem how to show "Tip of Day"-form, because it will stay
below Splash Screen when application is starting. I'm opening and
showing "Tip of Day"-form like...

Private Sub frmMain_Load(...) Handles MyBase.Load
'...
'// Open (if selected) the 'Tip of Day'-form in Dialog Mode
Dim blnShowTip As Boolean = "here is retrieved should tip of day-form
show or not according users check-selection"

If (blnShowTip) Then
    Dim f As frmTip = New frmTip()
         f.ShowDialog()
         f.Dispose()
End If
'...
End Sub

frmMain is Startup form, and it's now visible before "Tip of Day"-form
is closed. Obviously this it not the correct place to show "Tip of
Day"-form, so how to show it avoiding it to stay behind the Splash Screen?
--
Mika

Author
5 Jan 2006 3:24 PM
Dblood
Mika,

Just a stab in the dark here, but could you create a Public Tip of the
day Sub and call it from the OnClose of frmSplashScreen.  That way the
Tip of the day dialog would be dependent upon the splash screen
closing, and couldn't be behind it.

If I've misunderstood, please clarify.

Thanks,

Danny
Author
6 Jan 2006 11:59 AM
Mika M
> ...could you create a Public Tip of the
> day Sub and call it from the OnClose of frmSplashScreen.  That way the
> Tip of the day dialog would be dependent upon the splash screen
> closing, and couldn't be behind it.

Thanks Danny, but looks like code execution is never entering those
closing events like...

Private Sub frmSplash_Closing(...) Handles MyBase.Closing or such events. :(

I solved it this way...

Private TipShowed As Boolean

Private Sub frmMain_Activated(...) Handles Me.Activated
   If (TipShowed) Then Return

   If (My.Settings.ShowTipOfDay) Then
     Dim f As frmTip = New frmTip()
     f.ShowDialog()
     f.Dispose()
   End If

   TipShowed = True
End Sub

May not be the most sophisticated way, but it's working. :) Better
solution is always welcome.

--
Mika