Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

One start and stop button is there and one textbox is
there.when you click start button ,it will display
1,2,3......up to infinite in textbox.when you click stop
button it will stop.

Answer Posted / lince thomas

bool stopBtnClk = false;
bool startBtnClk = false;
private void BtnStart_Click(object sender, EventArgs e)
{
stopBtnClk = false;

startBtnClk = true;
int i = 1;
while (true)
{
textBox1.Text = i.ToString();
i += 1;
Application.DoEvents();
if (stopBtnClk == true)
{
break;
}
}
}

private void BtnStop_Click(object sender, EventArgs e)
{
stopBtnClk = true;
Application.Exit ();
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is mvc in c#?

896


What is Dependency of Injection?

958


What do you mean by shared assembly?

1052


What is the main usage of keyword “virtual” ? How does it work for a method or property?

918


Explain clr in brief.

962


What is difference between c and c sharp?

955


What are delegates?

1236


What is a Command Object in C#?

1035


How can I get the ascii code for a character in c#?

1064


what are implementation inheritance and interface inheritance?

941


What is an ienumerable in c#?

1000


What is the difference between func and action delegate?

947


Which of the following operations can you not perform on an ado.net dataset?

976


What framework is used for performance testing/load testing?

1970


if you do have a stack overflow profile.what is your ranking?

1893