|
-
Dec 11th, 2006, 02:11 AM
#1
Thread Starter
Lively Member
[RESOLVED] Splash Screen - Login Form - Main Form
Hello guys,
My Main Form takes several seconds to load so I set a splash screen to be showed while this main form is loading. But now I want a Login Form to pop up before Main Form is showed. If I set my Login form as the startup form then the splash screen is showed only while login form is being loaded so I need to:
- Show splash screen
- Load Main Form but not display it
- Show Login Form
- If Login is correct then show main form previously loaded.
I tried launching the login form from Main Form's Load event handler, but the splash screen keeps showing topmost over Login form. I am missing a "Loaded" event to handle.
Thanks in advance for your help!
Last edited by Shardox; Dec 11th, 2006 at 03:13 AM.
Reason: [RESOLVED]
-
Dec 11th, 2006, 02:40 AM
#2
Re: Splash Screen - Login Form - Main Form
Your splash screen will not be dismissed until your startup form is loaded. Set the WindowState and ShowInTaskbar properties of your main form to Minimized and False respectively. That means that the form will not be seen when it is loaded. That also means that the splash screen will be dismissed. Now handle the Shown event of your main form and display your login form there. If the login is not successful then close the form and the app will exit gracefully. If the login is successful then set the WindowState and ShowInTaskbar properties back to Normal and True to display the form.
-
Dec 11th, 2006, 03:11 AM
#3
Thread Starter
Lively Member
Re: Splash Screen - Login Form - Main Form
That's a clear and fast reply. Thanks a lot jmcilhinney, I will handle that shown event.
-
Jul 22nd, 2007, 01:22 AM
#4
New Member
Re: [RESOLVED] Splash Screen - Login Form - Main Form
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|