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 the namespcae generally given to the webpage of the .NET Framework ?

1126


Why do we use polymorphism in c#?

955


What is icomparable in c#?

1015


What are the advantages of using delegates in c#?

971


Why is main static in c#?

1014


What are c# collections?

951


What is int64 in c#?

941


How do you implement thread synchronization in c#?

950


how to compare numbers and dispaly the largest ? *first thing I wanted to do is to input how many numbers to be compared *and then analyzed the largest then display it.

1780


What is reference c#?

1023


Does a loop recorder have to be removed?

1091


When should we use sealed class in c#?

956


Is c# difficult to learn?

911


How big is a float?

1001


Explain the various types of classes used in c#?

990