yewmeng Posted January 11, 2004 Posted January 11, 2004 hi all... i have 2 form form1 --> mdi parent form2 ---> mdi child + button1 form 2 will show by clicking the menu at form 1 after that the menuitem will disable, button1 is unload form 1 and enable back the menuitem. my probelm is how to enable back the menuitem which i have disable i have try the following code at button 1 but is not working dim form1 as new form1 form1.menuitem.enable = true me.close pls help me, im stuck:confused: thx in advance Quote
*Experts* Bucky Posted January 12, 2004 *Experts* Posted January 12, 2004 What you can do is cast the MdiParent property of Form2 to a type of Form1, then access the properties of the MainMenu control. Be sure that the access modifier for the menu controls is set to Public, or else you won't be able to see it. Dim parentForm As Form1 = DirectCast(Me.MdiParent, Form1) ' Cast the parent form type to Form1 parentForm.MainMenu.MenuItems(0).Enable = True ' Enable the menu item here (put in your own code) Me.Close() Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.