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.

Re: Showing a form on another form's load by hirf-spam-me-here

hirf-spam-me-here
Fri Nov 07 14:03:50 CST 2003

* "Celio C. J." <anonymous@discussions.microsoft.com> scripsit:
> 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
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>