With this code I will show a message box that you can press Yes or No.
What happens when pressing Yes is that a panel will be Visible. On this panel, I have a label that shows text and a progressbar that will go from Value 0-100, like the code below.
The problem is that when the panel gets "Visible", the label that show text will not.
The label that shows text will be seen first when the progressbar have reached Value = 100.
I wonder how it could be possible to see the text "While" or practically before the progressbar begin it´t process ?
Is there any function that can make something wait or pause for 1 second. I have heard something about "Sleep" or "Pause".
That could be useful for many things perheps ?
System::Windows::Forms::DialogResult result = MessageBox::Show(this, "Hello", MessageBoxButtons::YesNo, MessageBoxIcon::Question);
if (System::Windows::Forms::DialogResult::Yes == result)
{
panel3->Visible = true;
}
if (System::Windows::Forms::DialogResult::Yes == result)
{
for(double i = 1; i < 100000005; i++)
{
progressBar2->Value = i / 1000000;
}
}