Here is the code that is doing the checks on the form:
Threading.Thread.Sleep(4000)
CheckNetwork()
Threading.Thread.Sleep(4000)
CheckDB()
Threading.Thread.Sleep(4000)
CheckEPN()
Threading.Thread.Sleep(4000)
My.Forms.frmMain.Show()
I am doing a sleep for 4 seconds between calls. Also, when I load the form,
the animation loads just fine, but the first call to the method that updates
the label freezes the animation and the form until it is loaded. I'll just
keep plugging at it I guess.
John
"rowe_newsgroups" <rowe_email@yahoo.comwrote in message
news:9d24a051-328a-46a2-9a02-95299ba82337@c58g2000hsc.googlegroups.com...
On Jul 17, 3:34 pm, "John Wright" <riley_wri...@hotmail.comwrote:
Quote:
Okay,
>
I set up a sub main to run and raised events. I subscribed to these events
in the form using event handlers. I simulated the connections and ran. I
got the outline of the form which appears while the process runs then it
goes away.
>
So I tried a background worker thread with the same results. Do I need to
refresh the form? How can I show the form all the way on a load like this?
>
John"John Wright" <riley_wri...@hotmail.comwrote in message
>
news:eYxyVSD6IHA.1200@TK2MSFTNGP04.phx.gbl...
>
Quote:
During my program startup I need to check for a couple of things.
1. I need to check for network availability
2. I need to check for database connectivity
3. I need to check for access to the server via a webservice
>
Quote:
I have written the code to do all of these things. Now I want to put
them
into a startup form. I want to load my main form, but from the main form
I want to call a splash screen with an animation on it that will cycle
through all the above events. This will let the user know there is
action
going on. Also, if the network or database connection fails, I want to
prevent them from using the program or store the files locally. If the
server cannot be accessed, I will write the data to the database then
process later. Again the code for these actions are done. What I need is
a really good way of showing a splash screen, update a label on the
splash
screen while checking for these items, then close the splash screen.
>
Quote:
I can load the splash screen as follows
>
Quote:
Dim mySplash as new splashScreen
mySplash.Show
>
Quote:
This will show the screen, but I need suggestions to update the label on
the screen while checking for the items above. Anyone have a good idea
or
can point me to an article on a good way to use a splash screen?
>
>
The problem is most likely that your connectivity checks are occurring
too fast, you'll probably need to add in some logic to keep the splash
screen showing for a while. Before doing anything heavy duty, you
could try opening the form on a seperate thread and then doing a
Thread.Sleep(1000) between the connectivity checks in Sub Main. If
that works you can look at writing the long term solution.
Thanks,
Seth Rowe [MVP]
http://sethrowe.blogspot.com/