Showing a form on another form's load

C

Celio C. J.

Hello.

How can I show a form as modal on another form's load
event so that the calling form is shown before the called
form.

I tried it by calling Form.ShowDialog from inside another
form load event, but the called form is shown before the
calling form gets visible.

Any ideia?

Thanks in advance,
Celio C. J.
 
H

Herfried K. Wagner [MVP]

* "Celio C. J. said:
How can I show a form as modal on another form's load
event so that the calling form is shown before the called
form.

I tried it by calling Form.ShowDialog from inside another
form load event, but the called form is shown before the
calling form gets visible.

\\\
Private Sub Form1_Activated( _
ByVal sender As Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Activated
Static p_blnActivated As Boolean
If Not p_blnActivated Then
p_blnActivated = True

' Show the 2nd form here!
End If
End Sub
///
 

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