I'm looking for a way to make my program wait for a page to load completely, before it keeps going and executes more code on the loaded document.
I didn't find any good way to do it, but I remembered that when we use MessageBox.Show("some string");
the program stops/waits(?) and then keeps going, even in a loop.
So when we have this loop:
for (int i = 0; i < 10; i++)
{
MessageBox.Show("i");
}
the i++
will not run until I press the OK button.
How were they able to do that?