Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Dear all,

I need to create a Login form with progress bar.

If my user name and password is correct, progress bar will start.
In end of the progress bar, form2 should be open with the hide of form1(Login Form).

I need coding for this project.

with expectation,
Viswanathan.M
Posted
Updated 14-Apr-11 22:25pm
v2
Comments
Prerak Patel 15-Apr-11 1:27am    
Won't you try it yourself? Is it that hard?
One more thing, if you are already authorized, why you need that progressbar?
Pong D. Panda 15-Apr-11 1:31am    
Fancy looking login page. Although the authorization process would only take a couple of milliseconds.
Dalek Dave 15-Apr-11 4:33am    
Edited for Grammar, Spelling and Readability.

So add a ProgressBar control to your form.
Add Progress and ProgressComplete events to Form2.
Subscribe in Form1, and update the ProgressBar with the progress from Form2.
When Form2 signals ProgressComplete, hide Form1.

What part of this is giving you problems?
 
Share this answer
 
Comments
Pravin Patil, Mumbai 15-Apr-11 6:36am    
Good one....
There is a solution like this that
into program file create a thread to the and its long sleep and then the main form is loaded. Of course, this is not a real loading
Enter this code to your program File:

static void Main()
{
    Application.EnableVisualStyles();
    Application.SetCompatibleTextRenderingDefault(false);
    AppDomain.CurrentDomain.SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy.UnauthenticatedPrincipal);

    System.Threading.Thread spThread = new Thread(() => new Loading().ShowDialog());

    spThread.Start();

    Thread.Sleep(1000);

    spThread.Abort();

    Thread.Sleep(100);

    Application.Run(new home());


}
 
Share this answer
 
v3
Comments
Dalek Dave 15-Apr-11 4:33am    
Good Call.
RaviRanjanKr 15-Apr-11 6:21am    
Nice Solution! My 5
Pravin Patil, Mumbai 15-Apr-11 6:36am    
My 5...

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