|
-
Jun 4th, 2005, 07:41 PM
#1
Thread Starter
Hyperactive Member
Help with splash screen
I am kind of new to .NET and well i was trying to figure out how to make a splash screen...
So far i have teh splash screen ready and all that but i cant seem to figure out how to have a timer in it so that lets say after 10 seconds it loads to a new form like this:
Splash.vb>(Wait 10 seconds)Main.vb
Any help would be appericiated
I searched the forums and found topics... but it didnt seem to have wut im looking for.
Last edited by PlaGuE; Jun 4th, 2005 at 07:48 PM.
-
Jun 4th, 2005, 07:57 PM
#2
PowerPoster
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
Taxes
The more I learn about VB.NET the more I like dBaseIII Plus
The foregoing, whilst believed to be correct, is given without guarantee as to it's accuracy and entirely without recourse. You are required to decide for yourself whether or not it is suitable for your purposes and no liability for loss of any nature can be entertained.
-
Jun 4th, 2005, 08:08 PM
#3
Thread Starter
Hyperactive Member
Re: Help with splash screen
Last edited by PlaGuE; Jun 4th, 2005 at 08:14 PM.
-
Jun 4th, 2005, 08:29 PM
#4
Thread Starter
Hyperactive Member
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.
Last edited by PlaGuE; Jun 4th, 2005 at 09:56 PM.
-
Jun 4th, 2005, 11:57 PM
#5
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.
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Jun 5th, 2005, 12:11 AM
#6
Thread Starter
Hyperactive Member
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...
-
Jun 5th, 2005, 12:30 AM
#7
Thread Starter
Hyperactive Member
Re: Help with splash screen
Without balance, there could only be chaos.
Without chaos, there could be no balance.
I live with karma. Eat with destiny. Dream of life without shackles....
Yet. If life had no consequences, life could not exist, nor could it flourish.
If at first you dont succeed.You're screwed.
C++/Java NOOB.
I aint a professional at PHP, but if i can help i will.
-
Jun 5th, 2005, 01:16 AM
#8
Re: Help with splash screen
lol @ sig 
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 ?
Tips:
- Google is your friend! Search before posting!
- Name your thread appropriately... "I Need Help" doesn't cut it!
- Always post your code!!!! We can't read your mind!!! (well, at least most of us!)
- Allways Include the Name and Line of the Exception (if one is occuring!)
- If it is relevant state the version of Visual Studio/.Net Framwork you are using (2002/2003/2005)
If you think I was helpful, rate my post  IRC Contact: Rizon/xous ChakraNET/xous Freenode/xous
-
Jun 5th, 2005, 01:34 AM
#9
Thread Starter
Hyperactive Member
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
Without balance, there could only be chaos.
Without chaos, there could be no balance.
I live with karma. Eat with destiny. Dream of life without shackles....
Yet. If life had no consequences, life could not exist, nor could it flourish.
If at first you dont succeed.You're screwed.
C++/Java NOOB.
I aint a professional at PHP, but if i can help i will.
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
|