setting the parent property from MDI child form in c#

G

Guest

How can I enable/disable Main Menu Item on MDI Parent Form
when a Child form is loaded?

Is it possible?

In one child form i the code below on the button click event.
The first line of code has error. I also dunno why may be it is not possible
to instantiate the parent form while it is active?

frmParent mdiParent=new frmParent();
mdiParent.mnuFileNew.Enabled=false;

Thanks.
 
H

Herfried K. Wagner [MVP]

Melisa said:
How can I enable/disable Main Menu Item on MDI Parent Form
when a Child form is loaded?

\\\
DirectCast(Me.MdiParent, MainForm).MainMenu1.MenuItems(18).Enabled = False
///
 
G

Guest

When I try this in C++/CLI, I receive an error stating that MainForm is an
undefined type. Please help.

Nicholas Nezis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top