|
-
Jun 17th, 2004, 09:01 AM
#1
Thread Starter
Lively Member
switching forms
I have a main form that I was using. Now I created a Splash screen to jazz up my program. How to get my splash screen to load up first?
Last edited by pea33nut; Jun 17th, 2004 at 01:20 PM.
-
Jun 17th, 2004, 01:19 PM
#2
Thread Starter
Lively Member
-
Jun 17th, 2004, 01:29 PM
#3
Project->Properties->Startup Object
-
Jun 17th, 2004, 02:44 PM
#4
Thread Starter
Lively Member
How do I set this up so my Main form displays after my splash screens timer expires?
Private Sub tmrAsiSplash_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrAsiSplash.Tick
Me.Close()
End Sub
Private Sub frmAsiSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Main As New frmMain
Main.Show()
End Sub
-
Jun 17th, 2004, 02:47 PM
#5
VB Code:
Private Sub tmrAsiSplash_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrAsiSplash.Tick
Dim Main As New frmMain
Main.Show()
Me.Close()
End Sub
Private Sub frmAsiSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
-
Jun 17th, 2004, 02:50 PM
#6
Thread Starter
Lively Member
It Just shuts the application down?
-
Jun 17th, 2004, 02:53 PM
#7
Create a new module and add a Sub Main in there. Change your startup object to Sub Main.
In sub main just have:
VB Code:
Sub Main()
dim f as new frmAsiSplash
f.ShowDialog()
dim fMain as new frmMain
fMain.showDialog()
End sub
Then in frmAsiSplash, just have this:
VB Code:
Private Sub tmrAsiSplash_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrAsiSplash.Tick
Dim Main As New frmMain
Main.Show()
Me.Close()
End Sub
-
Jun 17th, 2004, 03:16 PM
#8
Thread Starter
Lively Member
That worked but I was in some type of loop. my main form kept popping up ever few seconds.
-
Jun 17th, 2004, 03:35 PM
#9
Take the form main stuff out of the Tick event.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|