SplashScreen in my application

Hi,

I want to include a SplashScreen to my Visual Basic 2005 Application, when my application is started. I have added the standard SplashScreen-Item and changed the settings. When my applications is loaded the SplashScreen is showed for less than 1 second. 
How can I change the time value and show the SplashScreen for a longer period.
The second question:
How can I start a thread and load for example the application features before the main application starts

Thanks!


Answer this question

SplashScreen in my application

  • draxx

    Check this link, its a toturial for the back ground worker

    http://msdn.microsoft.com/msdnmag/issues/05/03/AdvancedBasics/

    about your first question, Did you manage to make the splash screen as you wanted
    you way use timer to close the splash screen after any seconds you define.

  • Aknght

    1. What item did you used for the SplashScreen 
        You way create the form yourself (FormBorder = none) and set a Timer event to close the form after any defined (milli)seconds.

    2. Use the background worker for any simple working+gui handling.
    the BackgroundWorker is a .NET new componnet, you set an event for the start of the worker, and events for updates and finish (i.e: to update the GUI).
    if you need some more information check the MSDN for an example or replay and I'll put a very simple example.

    Hope it helps.

    P.S
    C# or VB

    Eli.

  • Bad_Bob

    Use this cose for the splash screen :
    Put this code in the SplashScreenForm, hook the Form Load event to the SplashForm_Load method.

    Sorry for the C# code and not VB, but I don't think converting it should be a problem.


           // The timer object to use for closing the screen after X seconds
           private Timer closeFormTimer;

            /// <summary>
            /// Load form event handler -
            /// Create the timer to close the form after X seconds
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            private void SplashForm_Load(object sender, EventArgs e)
            {
                // New Timer object
                closeFormTimer = new Timer();
                // Number of seconds to show the form ( 5 seconds )
                int seconds = 5;
                // this is set in milliseconds
                closeFormTimer.Interval = seconds * 1000;
                // the event used to close the splash screen
                closeFormTimer.Tick += new EventHandler(closeFormTimer_Tick);
                // start the timer
                closeFormTimer.Start();
            }

            /// <summary>
            /// The event that closes the form
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>

            void closeFormTimer_Tick(object sender, EventArgs e)
            {
                closeFormTimer.Stop();
                this.Close();                        
            }


    Enjoy.
    Eli.

  • Ido F.

    Hi,

    thx for your answer. I use VB.NET an couldn't found some examples in the msdn. Could you give me some sample code, please

    Thank You

  • SplashScreen in my application