VB.Net - Form Loads but Label does not fill with text

I have a form (frmWaitProgressBar) that has 1 label and 1 progress bar. The label text is "Please wait while the Production Form loads...".

This form is called by another form using:

     Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
            frmWaitProgressBar.Show()
            frmWaitProgressBar.TopMost = True
            frmProd1.Show()
     End Sub

The form shows when called and the progress bar works, stepping through 20 blocks as called from frmProd1_Load event using   frmWaitProgressBar.pb1.PerformStep()  at 20 various points in the code.

All this is good, the problem is:

    The frmWaitProgressBar label shows but the text "Please wait while the Production Form loads..." that is supposed to be in the label does not, the label is blank.

If I call frmWaitProgressBar this way with the last line commented out:

     Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
            frmWaitProgressBar.Show()
            frmWaitProgressBar.TopMost = True
            'frmProd1.Show()
     End Sub

The form loads correctly with the label text showing.

What can I do to load frmWaitProgressBar and have the label text show when I call frmProd1.Show()?
Tim313Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

it_saigeDeveloperCommented:
Sounds like you have a blocking call that is being made before you set the label text.  Could you provide the full code for all the forms you are concerned with and their designers (frmProd1, frmWaitProgress and the main form that is calling them)?

-saige-
Tim313Author Commented:
The label text is set in the Designer - Properties

I've replaced the label with a textbox and set the text in Designer - Properties to "Please wait while the Production Form loads..."

This works, showing the textbox with the correct text.

Strange that one control will show its .text while another won't.

Thanks for your response, but I'm just going to use the textbox instead of the label.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
it_saigeDeveloperCommented:
Not a problem.  Let us know if there is anything else you need assistance with.

-saige-
ArkCommented:
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
            frmWaitProgressBar.Show()
            frmWaitProgressBar.TopMost = True
            My.Application.DoEvents
            frmProd1.Show()
     End Sub
Tim313Author Commented:
Not a real solution to the label text problem, but got to go with what works.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.