I want to know how to make an animated turning wait image for my program splash screen?

In my programs splash screen I have a label that says -- ".....Loading Application".  I want like to know how to make the 'turning bar" using the following characters -- \ | / --, that I could place in front of those words.  Thanks you.

Kevin

Also, please provide a software that might actually do these kinds of things, if you know one or two.  
kevin33809Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
You've tagged VB6 and VB.Net which are pretty different!

What VB are you using?
How are you displaying the splash form?
Is the splash form doing any actual processing?...or is it just eye-candy?
0
kevin33809Author Commented:
I'm using VS2008, and programming in Visual Basic.
I'm displaying the splash screen as 'Eye-Candy'.
0
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
Is it set via Project --> Properties or are you manually showing it with code?
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
Essentially you just use a Timer to update the Label:  
Public Class frmSplash

    Private WithEvents tmr As New System.Windows.Forms.Timer

    Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        tmr.Interval = 250
        tmr.Start()
    End Sub

    Private Sub tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr.Tick
        Static chars() = {"|", "/", "--", "\"}
        Static index As Integer = 0
        Label1.Text = chars(index) & "...Loading Application"

        index = index + 1
        If index = chars.Length Then
            index = 0
        End If
    End Sub

End Class

Open in new window


To keep the splash screen open for your desired amount of time, override the OnInitialize() method and set My.Application.MinimumSplashScreenDisplayTime Property:
http://msdn.microsoft.com/en-us/library/ms234874(VS.80).aspx

Click on Project --> Properties, then "View Application Events" in the bottom right:  
Namespace My

    ' The following events are available for MyApplication:
    ' 
    ' Startup: Raised when the application starts, before the startup form is created.
    ' Shutdown: Raised after all application forms are closed.  This event is not raised if the application terminates abnormally.
    ' UnhandledException: Raised if the application encounters an unhandled exception.
    ' StartupNextInstance: Raised when launching a single-instance application and the application is already active. 
    ' NetworkAvailabilityChanged: Raised when the network connection is connected or disconnected.
    Partial Friend Class MyApplication

        Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
            Me.MinimumSplashScreenDisplayTime = TimeSpan.FromSeconds(5).TotalMilliseconds
            Return MyBase.OnInitialize(commandLineArgs)
        End Function

    End Class

End Namespace

Open in new window

0
kevin33809Author Commented:
Question:  In the first textbox is all this code put in the  Load Event in the frmSplashScreen form, or is all this meant to be put in a Class file.  I'm learning here.  It looks to me like it belongs to the Load Event in the frmSplashScreen form

How the code is setup is in the attachment.  This name of the label is Label2 on the Splash screen.  Is the placement of the code correct?

Thank you
Public NotInheritable Class frmSplashScreen 

    Private Sub SplashScreen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 

        If My.Application.Info.Title <> "" Then 
            ApplicationTitle.Text = My.Application.Info.Description 
        Else 
            'If the application title is missing, use the application name, without the extension 
            ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName) 
        End If 

        Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
        Copyright.Text = My.Application.Info.Copyright 

    End Sub 

    Public Class frmSplash 
         Private WithEvents tmr As New System.Windows.Forms.Timer 

         Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 
             tmr.Interval = 250 
             tmr.Start() 

         End Sub 

         Private Sub tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr.Tick 
             Static chars() = {"|", "/", "--", "\"} 
             Static index As Integer = 0 
             Label2.Text = chars(index) & "...Loading Application" 
             index = index + 1 
             If index = chars.Length Then 
                 index = 0 
             End If 

         End Sub 

     End Class 

End Class

Open in new window

0
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
You would just add the code to your existing frmSplashScreen() class.  So you'd just take everything between my "Public Class frmSplash" and "End Class" and insert into your code.  We'd also have to consolidate the Load() event code into your method.

It would look something like:
Public NotInheritable Class frmSplashScreen 

    Private WithEvents tmr As New System.Windows.Forms.Timer 

    Private Sub SplashScreen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
        If My.Application.Info.Title <> "" Then 
            ApplicationTitle.Text = My.Application.Info.Description 
        Else 
            'If the application title is missing, use the application name, without the extension 
            ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName) 
        End If 

        Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)
        Copyright.Text = My.Application.Info.Copyright 

        tmr.Interval = 250 
        tmr.Start() 
    End Sub 

    Private Sub tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr.Tick 
        Static chars() = {"|", "/", "--", "\"} 
        Static index As Integer = 0 
        Label2.Text = chars(index) & "...Loading Application" 
        index = index + 1 
        If index = chars.Length Then 
            index = 0 
        End If 
   End Sub 

End Class

Open in new window

0
kevin33809Author Commented:
Idle_Mind:
I'm writing back to let you know that the code works great.  Thank you for not only showing me HOW to do it, but EXPLAINING how/why it works.  You a good teacher.  Since I trying to mentally migrate from VB6 to VB.net, it hasn't been easy, but I'll get there.  Please, except the 500 point.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kevin33809Author Commented:
Idle_Mind is one of EE better and thorough trainers/instructors.  I'd keep him.  He doesn't mind teaching a Newbee how to do something, and he does it without complaining and sarcasim.  Great job!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.