473,386 Members | 1,674 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 screen

Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a login
form. Can anyone give me a code example of how to do this elegantly?

Thanks

Regards
Nov 21 '05 #1
4 2469
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a
login form. Can anyone give me a code example of how to do this elegantly?

Thanks


I don't know how "elegant" this is, but it's one way to do it. In your
sub-main module:

Public Shared Sub Main()

'Load Splash
splashForm = New Splash
splashForm.Show()

'Setup Data Access Layer
'blah blah blah

'Setup Business Layer
'blah blah blah

'Load GUI
mainForm = New FormMain
Application.Run(mainForm)

End Sub

In the FormMain Load event:

Private Sub FormMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Do some stuff
splashForm.Update()

'Ready to present GUI to end-user
splashForm.Close()

End Sub

I hope this helps, good luck.

Carl
Nov 21 '05 #2
this would potentially cause a rendering problem if user does anything
during load time (such as drag another app window across loading app).
Threading is ideally needed.
br,
Mark.
"Vagabond Software" <vagabondsw-X-@-X-gmail.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and
while it is displayed I need to do some stuff in the background like
opening db connections etc. After that is done I need to close splash and
open a login form. Can anyone give me a code example of how to do this
elegantly?

Thanks


I don't know how "elegant" this is, but it's one way to do it. In your
sub-main module:

Public Shared Sub Main()

'Load Splash
splashForm = New Splash
splashForm.Show()

'Setup Data Access Layer
'blah blah blah

'Setup Business Layer
'blah blah blah

'Load GUI
mainForm = New FormMain
Application.Run(mainForm)

End Sub

In the FormMain Load event:

Private Sub FormMain_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

'Do some stuff
splashForm.Update()

'Ready to present GUI to end-user
splashForm.Close()

End Sub

I hope this helps, good luck.

Carl

Nov 21 '05 #3
Hi John, I was going to code an example for you, but after a quick search
there are loads of great examples - you can try from google using "splash
screen c#"

Here is one such example
http://www.codeproject.com/csharp/Pr...lashScreen.asp

Using Threading is the key.

Br,

Mark.

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:eh**************@TK2MSFTNGP12.phx.gbl...
Hi

I have a main sub as start-up. I need to display a splash screen and while
it is displayed I need to do some stuff in the background like opening db
connections etc. After that is done I need to close splash and open a
login form. Can anyone give me a code example of how to do this elegantly?

Thanks

Regards

Nov 21 '05 #4
"John" <Jo**@nospam.infovis.co.uk> schrieb
Hi

I have a main sub as start-up. I need to display a splash screen and
while it is displayed I need to do some stuff in the background like
opening db connections etc. After that is done I need to close
splash and open a login form. Can anyone give me a code example of
how to do this elegantly?

http://people.freenet.de/armin.zingl...adedSplash.zip
Armin
Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

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...
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...
2
by: Joe Cool | last post by:
Using VB in VS2005. 2005 has a new way to implment a spash screen that alleviates the need for hardly any code. But I have found that when a GUI that has a splash screen is run as a scheduled task,...
1
by: Ken Allen | last post by:
I am developing a small utility program that must perform a considerable amount of 'background' or 'research' work before it can display any user interface. In general it can take 3-15 seconds to...
5
by: steve | last post by:
Hi All I have a form set as the splash screen in VB.net 2005 application properties How can I tell when it has or is closing, as I want to then run some licence checking code without the...
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...
2
by: Newbie | last post by:
Hi, In the application properties of my vb.net 2008 project I have set one of my forms to be the splash screen. How do I increase the time the splash screen is displayed for. It vanishs to...
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.