Tip of Day

M

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?
 
D

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
 
M

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Application Startup event / Splash+Login Screens 10
Tip of the Day 2
Program Startup 6
Load Forms in background on startup 4
Splash Screen in DLL 3
Threaded SplashScreen 6
Splash screen 4
Splashscreen +startup 1

Top