trouble with events (Paint event) question - please help

G

Guest

Hi,

I have a Splash form in my Windows Forms app. It has a label on it, and in
the Paint event of the label, I draw some text on the label.

But I also want the Splash form to load my MDI form and carry out the
initialisation of the application...

Trouble is, it only paints the Splash form with the label and text, then it
does nothing else, even though I have code in the splash form Paint event
like this:

Me.Cursor = Cursors.WaitCursor

If m_blnPaintOnce = False Then
Call DrawStringFloatFormat(e)
Else
If m_blnAppReady = False Then
Label3.Text = "load management form"
ManagementForm = New frmManagement
m_blnAppReady = True
Else
Cursor = Cursors.Default
Label3.Text = "finished, hide and show"
Me.Dispose()
ManagementForm.Visible = True
End If
End If

I don't know what is wrong, it never shows the MDI form, just shows the
Splash form then stops.

I just want it to paint the slash form once, write the text on it, then laod
the main form, wait while it does it's work, then hide itself, but it never
does it.

Please help, this is really a strange problem.

thanks, Philip
 
S

Stoitcho Goutsev \(100\)

Philip,

I don't quite get your problem, but it could be because either you don't
have yet started the message pump (Application.Start) and there is no
WM_PAINT to fire your Paint events or because the application is too busy
with the initialization that it never goes back to the message loop to pull
out the WM_PAINT events.

Is your MDI form loads evenetually?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top