Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB Splash Screen?

VB Splash Screen?

Scheduled Pinned Locked Moved Visual Basic
question
11 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kobi1kobi
    wrote on last edited by
    #1

    I'm trying to make a splash screen where the program opens with frmOpen, and the form stays up for 5 seconds, and then frmMain should open. I know, it's probably silly, but I'm a total newbie in VB :) Thanks, kobi

    R 1 Reply Last reply
    0
    • K kobi1kobi

      I'm trying to make a splash screen where the program opens with frmOpen, and the form stays up for 5 seconds, and then frmMain should open. I know, it's probably silly, but I'm a total newbie in VB :) Thanks, kobi

      R Offline
      R Offline
      R Thomas 0
      wrote on last edited by
      #2

      go to project explorer window..right click on your project name->add->form->choose a splash form... vb has a inbuilt splash form... then set yourpoject properties startup object as frmSplash that u just added.. as for the five seconds add a times set it to 5 seconds(which i think is a bit too long) and on the routine of time unload the splash form and load your first form Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

      K 1 Reply Last reply
      0
      • R R Thomas 0

        go to project explorer window..right click on your project name->add->form->choose a splash form... vb has a inbuilt splash form... then set yourpoject properties startup object as frmSplash that u just added.. as for the five seconds add a times set it to 5 seconds(which i think is a bit too long) and on the routine of time unload the splash form and load your first form Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

        K Offline
        K Offline
        kobi1
        wrote on last edited by
        #3

        I must be doing something very wrong, but I don't see any reference to splash screen in the new items I can add in the VB project. There are lots of forms, source files, scripts, and other stuff, but no splash screen. What I need is help withthe timer control.. how to code a " hold the form1 open for X seconds and then close form1 and open form2" thanks, Kobi.

        G 1 Reply Last reply
        0
        • K kobi1

          I must be doing something very wrong, but I don't see any reference to splash screen in the new items I can add in the VB project. There are lots of forms, source files, scripts, and other stuff, but no splash screen. What I need is help withthe timer control.. how to code a " hold the form1 open for X seconds and then close form1 and open form2" thanks, Kobi.

          G Offline
          G Offline
          Guillermo Rivero
          wrote on last edited by
          #4

          Hold the current thread for a while.. Thread.CurrentThread.Sleep(5000) This code waits for 5 seconds... Free your mind...

          K 1 Reply Last reply
          0
          • G Guillermo Rivero

            Hold the current thread for a while.. Thread.CurrentThread.Sleep(5000) This code waits for 5 seconds... Free your mind...

            K Offline
            K Offline
            kobi1
            wrote on last edited by
            #5

            does it allow for any action to be performed on the form during those 5 seconds? like clicking? thx.

            G 1 Reply Last reply
            0
            • K kobi1

              does it allow for any action to be performed on the form during those 5 seconds? like clicking? thx.

              G Offline
              G Offline
              Guillermo Rivero
              wrote on last edited by
              #6

              Do you wanna build splash screen ?, if so, why you wanna performs clicks on the form ? Give it a try man, it won't take more than 5 minutes. Free your mind...

              K 1 Reply Last reply
              0
              • G Guillermo Rivero

                Do you wanna build splash screen ?, if so, why you wanna performs clicks on the form ? Give it a try man, it won't take more than 5 minutes. Free your mind...

                K Offline
                K Offline
                kobi1
                wrote on last edited by
                #7

                I wish it was that simple.. I need to put an easter egg in the opening form. I have a "about" button there, and I have a timer control set to 5000, with a ME.Close() code in the timer_elapsed(..) function, but I don't know how to open the next form I want to be opened.

                R 1 Reply Last reply
                0
                • K kobi1

                  I wish it was that simple.. I need to put an easter egg in the opening form. I have a "about" button there, and I have a timer control set to 5000, with a ME.Close() code in the timer_elapsed(..) function, but I don't know how to open the next form I want to be opened.

                  R Offline
                  R Offline
                  R Thomas 0
                  wrote on last edited by
                  #8

                  i wouldn't suggest putting th emain thread to sleep.... cause when u show the splash screen the user must have the opetion to click the splash screen to make it go away..so i suggest using a timer and then on click put unload form for splash screen...are u able to add it yet? Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

                  K 1 Reply Last reply
                  0
                  • R R Thomas 0

                    i wouldn't suggest putting th emain thread to sleep.... cause when u show the splash screen the user must have the opetion to click the splash screen to make it go away..so i suggest using a timer and then on click put unload form for splash screen...are u able to add it yet? Have a Super Blessed Day! ------------------------- For God has not given us a spirit of fear, but of power and of love and of a sound mind. 2 Timothy 1:7 "For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life." John 3:16 "Therefore you also be ready, for the Son of Man is coming at an hour you do not expet." Luke 12:40

                    K Offline
                    K Offline
                    kobi1
                    wrote on last edited by
                    #9

                    I go the main form to close, using a timer, but I don't know how to make a different form open after the "splash" screen closes.

                    D 2 Replies Last reply
                    0
                    • K kobi1

                      I go the main form to close, using a timer, but I don't know how to make a different form open after the "splash" screen closes.

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #10

                      OK. Your main form is NOT your splash screen. What you do in your main form is this: (From memory...so there may be some mistakes...)

                      Private Sub Form_Load()
                      Dim SplashScreen As New Form2

                      SplashScreen.Show()
                      

                      End Sub

                      Now, Form2 is your splash screen. It has the timer on it and enables the 5 second countdown in it's Form_Activate or Form_Load event. When the timer expires, in it's event, just close the form:

                      Private Sub Form_Activate()
                      Timer1.Interval = 5000
                      Timer1.Enabled = True
                      End Sub
                      Private Sub Timer1_Timer()
                      Me.Close
                      End Sub

                      During the 5 second countdown, your Splash screen is able to respond to events just like any other form. RageInTheMachine9532

                      1 Reply Last reply
                      0
                      • K kobi1

                        I go the main form to close, using a timer, but I don't know how to make a different form open after the "splash" screen closes.

                        D Offline
                        D Offline
                        Dave Kreskowiak
                        wrote on last edited by
                        #11

                        Or for a quick VB.NET discussion on MSDN, try this[^] RageInTheMachine9532

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups