473,657 Members | 2,800 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 1064
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
5997
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 makers in the world. He gets (sic) close to $5000 per custom made flyrod. A surprising number of people buy these fishing rods and never use them....they buy them as art-like investments. He is, after all, the best there is. But if you search on...
14
6686
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 form from: * load event of main mdi parent
11
1593
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 module to open the splash screen and then the mainform. The splash screen opens up, mainfrom load, but still it takes 3sec for the data to show up. What i want is while the mainform loads, i want to show the splash screen.
3
1210
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 single time the program is started. I do not want the main form to be seen prior to sucessfu completion of the registration form.
2
1919
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 DoCmd.OpenForm "Splash" then splash form opens without a border as desired but then the main form starts to appear before splash form has gone. How can I get the splash form to open without a border?
7
2859
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 event to make sure that my database connectivity works OK. If it does not, I give the user a warning message, but he can end up getting an unhandled exception that closes down the app, which is what I want in that case. However when the app shuts...
10
22363
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 progress of these tasks on a label on the SplashScreen form. Once this is completed ok, the splash screen should close and the login form should be displayed. A successful login closes that form and shows the main form.
1
1243
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 designed but my problem is how write the code to close the splash and display next form. please, can someone help and tell me how i will go about it.
4
5211
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 on the new thread and put the main thread to sleep until the splash screen has done the business, then i kill the new thread and start another to show the login and again put the main one to sleep. Problem i have is that my splash screen will show...
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8737
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8610
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4168
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
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 we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.