473,386 Members | 1,758 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

splash form

33
Pls look at below splash form display code sample. where in design view am i suppose to write the code. i have only splash_LoadByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load and Private Sub Timer1_Tick_3(ByVal sender As System.Object, ByVal e As System.EventArgs)
so where am i suppose to declare and write the below code

Private WithEvents myTimer1 As Timers.Timer
Dim myFrm as mainForm

2.Declare a function SetUpTimer() like this


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


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

Code: ( vb )
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2. SetUpTimer()
  3. End Sub
Jun 21 '07 #1
1 1370
dip_developer
648 Expert 512MB
Pls look at below splash form display code sample. where in design view am i suppose to write the code. i have only splash_LoadByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load and Private Sub Timer1_Tick_3(ByVal sender As System.Object, ByVal e As System.EventArgs)
so where am i suppose to declare and write the below code

Private WithEvents myTimer1 As Timers.Timer
Dim myFrm as mainForm

2.Declare a function SetUpTimer() like this


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


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

Code: ( vb )
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  2. SetUpTimer()
  3. End Sub
Dear menyki,
Dont you know where to declare the public variable in the code behind of a Form.??? Just look the following code section.....I am giving you the full code structure.....Youe code behind of splash form will look like

Expand|Select|Wrap|Line Numbers
  1.  
  2. Public Class splash
  3. Inherits System.Windows.Forms.Form
  4.  
  5. Private WithEvents myTimer1 As Timers.Timer
  6. Dim myFrm As Form1
  7. Private Sub splash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  8. SetUpTimer()
  9. End Sub
  10. Public Sub SetUpTimer()
  11. Try
  12. myTimer1 = New Timers.Timer
  13. With myTimer1
  14. .AutoReset = False
  15. .Interval = 3000
  16. .Start()
  17. End With
  18. Catch obEx As Exception
  19. Throw obEx
  20. End Try
  21. End Sub
  22. Public Sub myTimer1_Elapsed(ByVal sender As Object, ByVal e As System.Timers.ElapsedEventArgs) Handles myTimer1.Elapsed
  23. Me.Close()
  24. myFrm = New Form1
  25. myFrm.ShowDialog()
  26. End Sub
  27. End Class
  28.  
Jun 21 '07 #2

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

Similar topics

2
by: Bill | last post by:
Problem 1) Any ideas on how I would get a splash screen to appear for a certain amount of time when I open a database - it's to display a text based disclaimer message. I know about message...
3
by: andrewcw | last post by:
I implemented the simplest of splash screens ( static and on its own thread ). But it seem that when first called maybe 8 seconds elapsed before it showed up, the main form follows several seconds...
1
by: BillZondlo | last post by:
Can someone look at this and tell me why, when I call this from my main app, it displays fine (fades form in and out) but then before my main app displays, I see other dialog boxes flash...
14
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...
3
by: Eric A. Johnson | last post by:
In a new project I'm creating, I have my first form that loads being used as a splash screen, with a timer that activates after 5 seconds. I then want the main form to load. However, it isn't...
2
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
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...
2
by: will_456 | last post by:
In vb2005 Express: In My Project Application Splash Screen I have selected my splash screen form. The form opens on project startup but closes immediately before anyone would have time to read...
10
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...
4
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
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
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...

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.