470,626 Members | 2,153 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,626 developers. It's quick & easy.

MDI w/ child forms using activated event

I have a MDI form with the following
Public fm2 As New Form2()
Public fm3 As New Form3()
and
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
fm2.MdiParent = Me
fm2.Show()
End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click
fm3.MdiParent = Me
fm3.Show()
End Sub

Both MDIChild have this
Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
Me.Text = "Form Two"
End Sub

The first form I show will fire its activated event. the second form to sow will not fire the activated event
If I comment the mdichild = me from the show calls then both child forms will fire the activated event
Can anyone help me get the activated event to fire or both forms regardless of the order in which they are started
Nov 20 '05 #1
1 2450
Hi Slaprade,

I use the me.load event for that instead of the activated, gives me never
trouble.

Cor
I have a MDI form with the following
Public fm2 As New Form2()
Public fm3 As New Form3()
and
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click fm2.MdiParent = Me
fm2.Show()
End Sub

Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click fm3.MdiParent = Me
fm3.Show()
End Sub

Both MDIChild have this
Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated Me.Text = "Form Two"
End Sub

The first form I show will fire its activated event. the second form to sow will not fire the activated event If I comment the mdichild = me from the show calls then both child forms will fire the activated event Can anyone help me get the activated event to fire or both forms

regardless of the order in which they are started
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Dayne | last post: by
1 post views Thread by rawCoder | last post: by
3 posts views Thread by James Spibey | last post: by
2 posts views Thread by Lenster | last post: by
4 posts views Thread by teejayem | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.