"SharpCoderMP" <csharp_mp@interia.pl.NFSPM> schrieb:
> when form is loaded i would like to popup a message box to the user
> after the form is shown to him/her. there is onLoad event but it occurs
> just before form is displayed. how can i popup message box just after
> form is displayed?
\\\
Private Sub Form1_Activated( _
ByVal sender As Object, _
ByVal e As EventArgs _
) Handles MyBase.Activated
Static IsActivated As Boolean
If Not IsActivated Then
IsActivated = True
Application.DoEvents() ' ...
MsgBox("Form activated for the first time!")
End If
End Sub
///

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
SharpCoderMP - 30 Aug 2005 15:45 GMT
thanks - that did what i needed.
is Application.DoEvents() required?
i run my app with and without this line and there were no difference...
or maybe i miss something?
> "SharpCoderMP" <csharp_mp@interia.pl.NFSPM> schrieb:
>
[quoted text clipped - 8 lines]
> Application.DoEvents() ' ... MsgBox("Form activated for the
> first time!") End If End Sub ///
Herfried K. Wagner [MVP] - 30 Aug 2005 16:13 GMT
"SharpCoderMP" <csharp_mp@interia.pl.NFSPM> schrieb:
> thanks - that did what i needed.
> is Application.DoEvents() required?
> i run my app with and without this line and there were no difference...
> or maybe i miss something?
No, it's not required.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>