C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

Creating Splash Screen in VB.NET using Form


Posted Date: 21 Sep 2008    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: Bindu BujjiMember Level: Gold    
Rating: 1 out of 5Points: 10



Hi,
Let's create a splash screen using Normal windows Form (like Form1 , form2 ..)

So here when you run the project, first It appears splash screen and wait for 5second, if u user doesn't click "continue", button in 5 seconds, then it navigates to the required page that we mentioned. Got it!!

In order to complete this we need a form named as "splash", a timer and two buttons "btnContinue", "btnCancel".

Now set the Timer's Interval Property to 1000 ( the frequency of elapsed events in Milliseconds).

So now in the form Load event goes like this

Before that i am declaring variable

Private splashCounter As Integer

Private Sub Splash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub


Now we have to write code in Timer1's "Tick" event like this.

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
'Splsh Screen appear for 5 Seconds
If splashCounter = 5000 Then
Me.Dispose()
Else
splashCounter += 1000 //every time it gets incremented by 1000, until it reaches 5000 MilliSeconds ( that is 5 seconds)
End If
End Sub


Now in "btnCanel" click Event

Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
Me.Dispose(True)
End Sub

Now in "btnContinue" click
Me.Dispose()
//here write code to show another form or what ever the requirement is


Your input is appreciated.











Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Splash Screen using VB.NET  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Using First Function of Linq
Previous Resource: Using Simple Maths Expressions Like X+100+20
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use