0

With the command"NumericUpDown Control" I would run a command based on the number selected in NumericUpDown Control

example
If I select the number 5 in the Control NumericUpDown instruction must be repeated
5 times/x5

PS: sorry for my English but I am Italian

2
Contributors
12
Replies
13
Views
6 Years
Discussion Span
Last Post by bbman
0

Hello, bbman.
What have you done so far? What's not working or what's giving you unexpected/undesired results?

0

this is one part of my project

private void button1_Click(object sender, EventArgs e)
        {
            String indirizzo = textBox1.Text;
            webBrowser1.Navigate(new Uri (indirizzo));
            System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(@"C:\Program Files\Visit Inject\ip.exe");
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo = p;
            proc.Start();
            proc.WaitForExit();
        }

      

        private void numericUpDown1_ValueChanged(object sender, EventArgs e)
{

// there I would like to enter the command to repeat the instruction es(x5)
}

        {
0

you mean, something like this?

for(int i = 0; i < REPEAT_TIMES; i++){
    //some work to repeat "REPEAT_TIMES" times 
}
0

I want the instruction

String indirizzo = textBox1.Text;
            webBrowser1.Navigate(new Uri (indirizzo));
            System.Diagnostics.ProcessStartInfo p = new System.Diagnostics.ProcessStartInfo(@"C:\Program Files\Visit Inject\ip.exe");
            System.Diagnostics.Process proc = new System.Diagnostics.Process();
            proc.StartInfo = p;
            proc.Start();
            proc.WaitForExit();

repeats based on the number selected in NumericUpDown Control

0

So what's the problem? I gave you a solution. You just need to pick up a number of times to repeat from your control and place your work at the certain place.

0

thanks
the only problem is that if I increase the NumericUpDown control ... you run the instructions, but I would like that if I click button1, the instructions are executed according to the times selected with the command NumericUpDown

Edited by bbman: n/a

0

thanks
the only problem is that if I increase the NumericUpDown control ... you run the instructions, but I would like that if I click button1, the instructions are executed according to the times selected with the command NumericUpDown

Edited by bbman: n/a

0

So if you want it to execute after button click, why wont you put all this into a button click event, rather than in a numericUpDown1_ValueChanged? ;)

0

oh, c'mon! :) We'll get this to work, just put some effort (don't expect for a ready-made solution ;))

1

Tomorrow I'll read some tutorials and try to finish that instruction
Also I prefer to figure out alone or with some help rather than cut and paste :icon_cheesygrin:
I will follow your advice "button click event" and if I can find the solution I'll post

Edited by bbman: n/a

Votes + Comments
Good approach .. waiting for a good news from you :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.