mariuslaurentiu
Programmer
Hi,
I create an dynamic menu from sql database and after I click one item menu i disable it. One instance of a form appear and when I close it I want to enable the menu item.
My problem is when I use two menu items who run two instances of the same form; the menu item remain disable after I close the both forms.
Sorry for my English.
childForms(childForm) = New Nomenclator()
iMeniu.Enabled= False
AddHandler childForms(childForm).Closed, AddressOf ChildClosed
childForms(childForm).MdiParent = Me
childForms(childForm).Show()
Private Sub ChildClosed(ByVal sender As Object, ByVal e As System.EventArgs)
iMeniu.Enabled = True
RemoveHandler childForms(childForm).Closed, AddressOf ChildClosed
End Sub
I create an dynamic menu from sql database and after I click one item menu i disable it. One instance of a form appear and when I close it I want to enable the menu item.
My problem is when I use two menu items who run two instances of the same form; the menu item remain disable after I close the both forms.
Sorry for my English.
childForms(childForm) = New Nomenclator()
iMeniu.Enabled= False
AddHandler childForms(childForm).Closed, AddressOf ChildClosed
childForms(childForm).MdiParent = Me
childForms(childForm).Show()
Private Sub ChildClosed(ByVal sender As Object, ByVal e As System.EventArgs)
iMeniu.Enabled = True
RemoveHandler childForms(childForm).Closed, AddressOf ChildClosed
End Sub