Re: Help with splash screen
Hi,
In the Activated event of the splash form put
VB Code:
Threading.Thread.Sleep(10000)
Me.Close
To make this work properly, assuming your designed forms are named fclsSplash and fclsMain, use a Module and make the Sub main your startup object. In athe Module put
VB Code:
Dim frmSplash as fclsSplash
Friend frmMain as fclsmain
Public Sub Main()
frmSplash = New fclsSplash
frmSplash.ShowDialog
frmMain = New fclsMain
Application.Run(frmmain)
End Sub
PS. Welcome to the forum. You have the right attitude if you searched for your question before posting :thumb:
Re: Help with splash screen
Re: Help with splash screen
like i stated im new to .NET i still dont understand all this.
I appericiate any and all help.
how do i use sub main form? I have an idea too it but i could be wrong.
i get no errors... but the splash screen wont show...but the main app does.
Re: Help with splash screen
What Taxes wanted you to do is create a module and set it as the startup object.
Add a Module to your project.
-Right Click the Project In Solution Explorer
-Select Add > Add Module...
-Name It, eg "Main",
Change the Startup Object
-Right Click the Project In Solution Explorer
-Select Propertys
-Change the Startup object Listbox to "Sub Main"
Now copy any paste Taxes code into the Module.
Now it should work fine.
Re: Help with splash screen
i thought that much and did that...
heres my forms
splash.vb
VB Code:
Private Sub splash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Threading.Thread.Sleep(10000)
Me.Close()
End Sub
smain.vb(module)
VB Code:
Module smain
Dim frmSplash As splash
Friend frmMain As main
Public Sub Main()
frmSplash = New splash
frmSplash.ShowDialog()
frmMain = New main
Application.Run(frmmain)
End Sub
End Module
and its set for sub main... it just blinks the image then goes to my main form.
I've been at this for hours...lol...
Re: Help with splash screen
Re: Help with splash screen
lol @ sig :D
Remove the code you put in the Splash Form's Form_Load Event and add this:
VB Code:
Private Sub Splash_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
Application.DoEvents()
Threading.Thread.Sleep(10000)
Me.Close()
End Sub
That should fix it :P
btw: Trigun Fan ?
Re: Help with splash screen
thanks ... yes that did fix it... not really that big of a trigun fan ...catch it here and there. Im more of a DB/Z/GT, Gundam fan