Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created login form and splash screen,MDI form. I want on running after splash screen is executed, it should display login form.
how can I do this
thanks in advance
regards
Posted
Updated 17-May-11 1:02am
v2

Make the Splash screen the Startup form for your application. When the splash scren is done, make it open up your Login form. If login is successful, then you get the login form to open up your main form. Here is the basic outline

C#
public class splashscreen
    {
        public splashscreen()
        { }
        private void AmDone
        {
            Form login = New formLogin();
            login.Show();
            this.Close();
        }
    }
    public class formMain
    {
    }
    public class formLogin
    {
        private void LoginSuccessFul()
        {
            Form formMain = new formMain();
            formMain.Show();
            this.Close()
        }
    }



Hope this helps
 
Share this answer
 
v2
Comments
shivani 2013 17-May-11 7:33am    
thanx i got
Hi Member 7882565,

What I have understood from your question that you need this :

Login Log = new Login();
Log.ShowDialog();


I hope this help,
:)
 
Share this answer
 
Comments
shivani 2013 17-May-11 7:12am    
Sir/Mam
on running project splash screen appears and them MDI parent form...wat shld I do so that after running splash screen i should get login page
shivani 2013 17-May-11 7:32am    
thanx i got
Dalek Dave 18-May-11 17:45pm    
Good call
This Codeproject tip/trick may help you:

Multiple Subsequent "Main" Forms in C# Apps[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-May-11 17:52pm    
Good idea.
--SA
The timer_Elapsed is an event that gets executed when timer interval is completed,so write code to show login screen in elapsed event.

private void Load()
{
System.Timers.Timer timer = new System.Timers.Timer();
timer.Interval = 500;
timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
}
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
      //write code to show login screen here
}
 
Share this answer
 
v5
Listen to a good friendly advice: never use MDI!
See:
Question on using MDI windows in WPF[^],
MDIContainer giving error[^].

—SA
 
Share this answer
 
By searching google or any search engine site.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900