After Load Event?

C

Collin Smith

Hi all,

I was looking for the equivalent of an "after load" event to fire when I
load a windows form. I'm opening an additional form in the first form's
load event, the problem is the form will open before the first form is
displayed and thus display behind the first form. I can code around this,
but is there obvious event that I am missing to have instructions processed
after the first form is rendered?

Thanks,

Collin
 
H

Herfried K. Wagner [MVP]

* "Collin Smith said:
I was looking for the equivalent of an "after load" event to fire when I
load a windows form. I'm opening an additional form in the first form's
load event, the problem is the form will open before the first form is
displayed and thus display behind the first form. I can code around this,
but is there obvious event that I am missing to have instructions processed
after the first form is rendered?

In the form's 'Load' event handler:

\\\
Me.Show()
Me.Refresh()
Dim f As New Form2()
f.Show()
///
 
A

Alok

Another option:
handle Activate Event of the first form as :

Private Sub firstform_Activate(sender, e)
Static isFirstTimeActivate as Boolean = False
If isFirstTimeActivate Then Return

isFirstTimeActivate = True
Dim f as new Form2()
f.Show()
End Sub

HTH
 

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