473,503 Members | 7,214 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

display splash problem

33 New Member
am designing a software. in the software i want the splash to display for sometime, say 30 secons then it will close and the main form will come up.

i included timer control in the splash form i designed but my problem is that it continues displaying main form continuesly without stop the (i.e. it displays many main form) the code is as shown below

Expand|Select|Wrap|Line Numbers
  1. Private Sub Timer1_Tick_4(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  2.         Dim mainForm As New mainForm
  3.         Me.Visible = False
  4.         mainForm.Visible = True
  5.     End Sub
already i have set the timer property as follow
Enable = true
interval = 3000
Jun 20 '07 #1
1 1056
dip_developer
648 Recognized Expert Contributor
am designing a software. in the software i want the splash to display for sometime, say 30 secons then it will close and the main form will come up.

i included timer control in the splash form i designed but my problem is that it continues displaying main form continuesly without stop the (i.e. it displays many main form) the code is as shown below

Expand|Select|Wrap|Line Numbers
  1. Private Sub Timer1_Tick_4(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  2. Dim mainForm As New mainForm
  3. Me.Visible = False
  4. mainForm.Visible = True
  5. End Sub
already i have set the timer property as follow
Enable = true
interval = 3000
1.Declare a Timer variable with events and Form variable like this

Private WithEvents myTimer1 As Timers.Timer
Dim myFrm as mainForm

2.Declare a function SetUpTimer() like this

Expand|Select|Wrap|Line Numbers
  1.  
  2. Public Sub SetUpTimer()
  3. Try
  4. myTimer1 = New Timers.Timer
  5. With myTimer1
  6. .AutoReset = False
  7. .Interval = 3000
  8. .Start()
  9. End With
  10. Catch obEx As Exception
  11. Throw obEx
  12. End Try
  13. End Sub
  14.  
3.In the Timer_Elapsed event write following code

Expand|Select|Wrap|Line Numbers
  1.  
  2. Me.Close()
  3. myFrm = New mainForm
  4. myFrm.ShowDialog()
  5.  
4. In the Load event of Splash form call SetUpTimer()

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  3. SetUpTimer()
  4. End Sub
  5.  
Jun 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

67
5944
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
14
6678
by: SStory | last post by:
I am trying to make a splash screen for my vb.net app. It is an mdi app. including the splash code produces wierd results. not inluding makes things fine. Also have tried loading the splash...
11
1569
by: K E Senthil Kumar | last post by:
Hi, I have created an application which uses a SQL server database. I created a mainform which retreives all the customers. This takes about 3sec. I have created a splash screen too. I use a...
3
1208
by: googlinggoogler | last post by:
Hi, I would like to display a form (to add registration information) before the main form loads obviously I would like to place this inside an IF statement as I dont need to register every...
2
1900
by: John | last post by:
Hi I have created a splash form with no border. When I try to open this form in my main form using DoCmd.OpenForm "Splash", , , , , acDialog, the splash form opens with a form border. If I use...
7
2845
by: Bob | last post by:
I have a winforms app written in Vs2005 Vb.Net, The setiings are to Enable the application Framework and I defined a splashform. Works fine if no errors occur. I do a checking on the mainform load...
10
22305
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show...
1
1233
by: menyki | last post by:
am designing a software. in the software i want the splash to display for sometime, say 1 minute then it will close and the main form will come up. i included timer control in the splash form i...
4
5193
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash...
0
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7291
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.