.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> C# >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Using Progress Bar control in Login Form

Posted By:Deepika Haridas       Posted Date: August 20, 2009    Points: 25    Category: C#    URL: http://www.dotnetspark.com  
 

Description :

Simple use of progress bar control which is being used in many places. I have made a sample for login form.














VB.Net

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim x As Integer

If TextBox1.Text = "deepika" And TextBox2.Text = "pass" Then

ProgressBar1.Visible = True

ProgressBar1.Minimum = 1

ProgressBar1.Maximum = 100000

ProgressBar1.Value = 1

ProgressBar1.Step = 1

For x = 1 To 100000

ProgressBar1.PerformStep()

Next x

Me.Hide()

Form2.Show()

Else : MsgBox("Wrong User ID or Password! Try Again!")

TextBox1.Text = ""

TextBox2.Text = ""

End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Me.Close()

End Sub

End Class

C#


private void button1_Click(object sender, EventArgs e)

{

int x = 0;

if (textBox1.Text == "deepika" & textBox2.Text == "pass")

{

progressBar1.Visible = true;

progressBar1.Minimum = 1;

progressBar1.Maximum = 100000;

progressBar1.Value = 1;

progressBar1.Step = 1;

for (x = 1; x <= 100000; x++)

{

progressBar1.PerformStep();

}

this.Hide();

frm.Show();

}

else

{

MessageBox.Show("Wrong User ID or Password! Try Again!");

textBox1.Text = "";

textBox2.Text = "";

}


For more details visit this link

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend