Creating a splash screen and Application forms controller

  • Thread starter Thread starter Joe Ocampo
  • Start date Start date
J

Joe Ocampo

I have been developing web sites for the past year now in vb.net and I now
have to tackle windows form. The problem I am having seems to be a simple
one but the solution has eluded me. I have several forms that collect
information and populate a global employee class. The problem that I am
having is the extantiation of the forms. I open a main form and then the
following three forms are extantiated from the main form load routine. Once
I finish with the third form I want to destroy the forms and open a new form
and pass the global employee class to the next series of forms.



I am trying to achieve a kind of wizard appearance with the form this is why
I have to load 4 forms at once since I must maintain state from one form to
the next so that the user can traverse forwards and backwards.



1.) Is there a more efficient means of extantiating these forms one at a
time then extatiating all of them at once and traversing forwards and
backwards only to destroy the forms and end up passing the global employee
object to the next series of forms?

2.) The last problem I am having is the splash screen When I load the
splash screen after the thread.sleep I load the main form well since the
main form loads 3 additional forms into memory you see a faint flicker of
the forms as they load. Highly annoying. I am not call the show method so I
am wondering why you even see the brief painting of the screen during
extantiation?





Form load timeline



Main form

-Load Employee Class

-Loads Splash

-Show Splash

-Loads Form1

-Loads Form 2

-Loads Form 3

-Show Main Form



Main Form Next Method

-Hide Main form

-Show Form 1

-Shoe Form Next Method

-Hide Form 1

-Show Form 2

-etc.

End of form 3 raise event to main form to say we are done with part 1



Catch Event and destroy Main form and pass Employee object to Part 2
constructor?

HERE IS THE PROBLEM WHEN I DESTROY THE MAIN FORM I LOOSE MY EMPLOYEE OBJECT
SINCE IT WAS RUNNING INSIDE THE MAIN FORM AND I DON'T KNOW WHERE TO
EXTANTIATE THE NEXT FORM FROM?



Thanks for any help in advance.
 
Back
Top