L
L
libera2015-12-15 16:34:33
C++ / C#
libera, 2015-12-15 16:34:33

The loop is executed 1 time and gets up at the end?

int i;
            for (i = 0; i <= 4; i++)
            {
                button1_Click(sender, e);
                massiv(sender, e);
                date(sender, e);
                cogla(sender, e);
                pole_zapol(sender, e);
                accaount(sender, e);
                
            }
            textBox5.Text = (i).ToString();
        }

He must press the start button, then perform the rest of the methods, and then start all over again.
And he does everything 1 time and goes to the end.
Only 1 action is performed at 100%, after which the rest of the action literally ignores or re-runs everything, but all separately.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Elizariev, 2015-12-15
@libera

Please provide context. Or provide the source (for example, through the service https://gist.github.com/ ).
Most likely one of the called methods is doing something with the thread of execution.
Oh, yes, you write a parser with an autocomplete. The problem is most likely that the button1_Click method does the browser navigation, but yet you are trying to act on the document that hasn't loaded yet right after that.
But in fact, your problem is that you have taken on a task for which you do not have enough knowledge. Get started with multithreading in the Windows Froms environment. Learn how to use the debugger. Learn the event-driven approach in development. You are trying to work with Windows Forms as if you were writing a simple console program.

J
jackroll, 2015-12-15
@jackroll

Pavel is right

P
Pavel Shvedov, 2015-12-15
@mmmaaak

jackroll is right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question