?
Solved

USING TIMER WITHIN A VB APPLICATION.....

Posted on 2003-03-11
3
Medium Priority
?
258 Views
Last Modified: 2010-04-17
I am fairly new to VB,  and am trying to create a new application that briefly displays a splash form when executing the application.  I would like the splash form to display for 5 seconds and then to open another form.  I have tried adding a timer onto my startup splash form,  and setting the parameters but doesn't seem to work.  Could anybody let me know how to use the Timer to close down a form after the specified interval setting.  

Thanks.
Steveeb.
0
Comment
Question by:SBrighty
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:SBrighty
ID: 8109833
ANY Ideas....
0
 
LVL 1

Accepted Solution

by:
Cliven earned 60 total points
ID: 8109993
paste this code in splash form. Remember to add the timer controler active x into splash.

Private Sub Form_Load()
Timer1.Interval = 5000
End Sub

Private Sub Timer1_Timer()
Form1.Show 'Next form to be show
Unload Me
End Sub
0
 
LVL 5

Expert Comment

by:yronnen
ID: 8110116
Cliven's answer has one problem. If your main form of the application is the splash form, and yuo will unload it after loading the Form1, the application will shut down...

The solution is to add a simple vb motule with a procedure called main, and set the module and procedure as startup object in the project properties. In this procedure you should load the splash form and the main form.

You can ask VB to do all the above automatically by selecting the VB application wizard and choosing a splash screen. This will do the dirty work for you. You can then implement Cliven's code and just remove the "Form1.Show" line.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Progress
Introduction to Processes

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question