Showing a form on another form's load

  • Thread starter Thread starter Celio C. J.
  • Start date Start date
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.
 
* "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
///
 
Back
Top