Control MenuItem on MDI application
-
I'm a senior student. I'm making graduation report so I need your help! I have MDI application with MainMenu on FormMain. When runtime i opened a childform,i do something on it and i want to control(enable/disable) some of MenuItem on MainMenu. This is my code: //////Module///// Module class...... public sub ControlMenu(Byval mnu as system.windows.forms.form.MenuItem,Byval bool as boolean) mnu.enable=bool end sub ........ End class ////////FormMain//// Class FormMain ..declare some var ... private child as ChildForm ..... //event MenuItem childform.click() private sub childform_click(byval sender as object, byval e as ...)Handle childform.click child =new childform child.MdiParent=Me child.show() end sub .... End Class /////ChildForm////// Class ChildForm ..do something //set a MenuItem Me.parent.ControlMenu(NameOfmnuItem,fasle) //Close child form Me.close (or Me.hide) End Class But I get an error or ControlMenu not declare this show up whenever i move mouse on Me.parent.ControlMenu(NameOfmnuItem,fasle). Everybody help me Plz. Thanks