473,765 Members | 2,066 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2515
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:eh******** ******@TK2MSFTN GP12.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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

'Do some stuff
splashForm.Upda te()

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

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******** ********@TK2MSF TNGP14.phx.gbl. ..
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:eh******** ******@TK2MSFTN GP12.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(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load

'Do some stuff
splashForm.Upda te()

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

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.in fovis.co.uk> wrote in message
news:eh******** ******@TK2MSFTN GP12.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.in fovis.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
6922
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 boxes in VB but I don't my users having to click on an OK buttone each time this appears. Problem 2)
3
2259
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 later. Naturally recalling the application, the response is adequate I have 10 classes in my project. Some small, none really huge. And another form public class frmQCLoader : System.Windows.Forms.For { private System.Windows.Forms.DataGrid...
14
6697
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
2
2107
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, the splash screen (and no other screen) is displayed for the entire run of the application. How can I disable the spalsh screen just for when an app is run as a scheduled task?
1
2255
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 perform all of the work requured before we display any user interface. So we have determined that the utility should have a splash screen to assure the user that the program is executing and will provide results shortly. I should also note that...
5
6411
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 splash screen interfering with msgboxes which may need to be displayed if the licence is invalid or missing I have tried in the splash form's formclosing event but it does not fire
2
4219
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 it. I presume it only stays visible while the main form initialises. This is not long enough but I can't see how to slow it down. Should I set the splash screen using the Application settings or go back to
10
22378
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.
4
5222
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...
2
16016
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 quick,and I would like it to display for 4 seconds Thanks
0
9404
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
10007
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
9959
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
9835
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
8833
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...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5277
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...
2
3532
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.