Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Activated does not fire.
Message
 
À
30/07/2004 17:03:30
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00929677
Message ID:
00929820
Vues:
9
You can use the parent MciChildActivate to call a public method of the form. See an example at http://www.dotnetforums.net/showthread.php?t=77314

Of course, another solution is to upgrade to VB.Net 2003.


>Yes, that is where I had put my code to get around the problem. But this can be a problem because the ENTER event fires twice.
>
>Thanks for your help.
>>1.0.... = 2002
>>1.1.... = 2003
>>
>>It is a know bug! I've aldready talk about it in a column of the UTMag (http://www.utmag.com/September2003/Page13.asp)
>>
>>
>>The child forms do not get the Form.Activated event (only the parent MDI). To catch MDI children being activated, listen to the Enter/Leave events of that child Form or listen to the Form.MdiChildActivate event in the parent Form.
>>

>>
>>
>>>Correction I don't know what version.
>>>In about the Framework version is 1.0.3705
>>>>Are you using VB.Net 2002 ?
>>>>
>>>>
>>>>>I have a form behavior I didn't expect.
>>>>>
>>>>>Create a new windows application project.
>>>>>
>>>>>add a windows form form2
>>>>>in the activated event change the background color
>>>>> Private Sub Form2_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Activated
>>>>> Me.BackColor = Color.Red
>>>>> End Sub
>>>>>
>>>>>Change form1 to ismdicontainer = true
>>>>>add a menu to form1
>>>>>in the click of the menupad instantiate form2
>>>>> Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
>>>>> Dim ThisForm As New Form2()
>>>>> ThisForm.MdiParent = Me
>>>>> ThisForm.Show()
>>>>>
>>>>> End Sub
>>>>>
>>>>>run the application
>>>>>click on the menu
>>>>>form2 appears and the background is red
>>>>>click on the menu again
>>>>>another form2 appears but the background color does not change. The activated event does not fire.
>>>>>
>>>>>WHY???????????????
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform