Do something X times
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks
Ummm, maybe I'm being dense and not really understanding your question, but what's wrong with a for loop?
There are three kinds of people in the world - those who can count and those who can't...
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks
jammmie999 wrote:
Hi Is it possible to do some code X times e.g. //10 times messagebox.show("Hello");
Simply Use Loop. :-O
cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks
It's obvious you know nothing about programming, yet. So, buy a book before you ask the most elementary questions here. Knowing what a messagebox is, before knowing about basic constructs, will only create holes in your knowledge that you may never adequately fill. Do a course, or buy a basic book and read all of it.
Christian Graus Driven to the arms of OSX by Vista. Please read this[^] if you don't like the answer I gave to your question. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");Seriously; look at a for-loop
for(int i = 0; i < UpperBound; i++)
{
//Action here
}If there's only one action, then you can drop the { and }
Between the idea And the reality Between the motion And the act Falls the Shadow
-
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");
MessageBox.Show("Hello");Seriously; look at a for-loop
for(int i = 0; i < UpperBound; i++)
{
//Action here
}If there's only one action, then you can drop the { and }
Between the idea And the reality Between the motion And the act Falls the Shadow
Uhm, dah, uhm whats UpperBound and why do you have a double ++ after i
Never underestimate the power of human stupidity RAH
-
Uhm, dah, uhm whats UpperBound and why do you have a double ++ after i
Never underestimate the power of human stupidity RAH
these are just minor typos; anyway you're better of with an OK-Cancel kind of interface so the user can chose the number of greetings he gets. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Hi Is it possible to do some code X times e.g.
//10 times
messagebox.show("Hello");Thanks