By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

Access MDI Form Menu Item from a child dll Form

P: n/a
PK
Hi,
I've a MDI form and a child form that comes from a dll. Everything works
fine until I had to uncheck or check a menu item in the MDI form based on
the changes in the child form. How to acheive this ? How can a child form
(that is in dll) access a menuitem in the main form ?
Pl. help.

Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Try casting the ChildForm.Parent property to an instance of your parent
form, and then accessing the MainMenu of the parent from that object.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

PK wrote:
Hi,
I've a MDI form and a child form that comes from a dll. Everything works
fine until I had to uncheck or check a menu item in the MDI form based on
the changes in the child form. How to acheive this ? How can a child form
(that is in dll) access a menuitem in the main form ?
Pl. help.

Nov 16 '05 #2

P: n/a
PK
I'm aware of this solution. But the problem here is; the child form is not
in the same project. My child form is in a dll, therefore I can't cast it. I
will not know the parent, since the child form is in a DLL.

"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
Try casting the ChildForm.Parent property to an instance of your parent
form, and then accessing the MainMenu of the parent from that object.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

PK wrote:
Hi,
I've a MDI form and a child form that comes from a dll. Everything works
fine until I had to uncheck or check a menu item in the MDI form based on the changes in the child form. How to acheive this ? How can a child form (that is in dll) access a menuitem in the main form ?
Pl. help.

Nov 16 '05 #3

P: n/a
Have you tried using the Menu property of the parent Form object
("this.MdiParent.Menu" from within the child form code) to access its active
MainMenu (assuming it has one)?
"PK" <us******************@softech-usa.com> wrote in message
news:u6*************@TK2MSFTNGP11.phx.gbl...
I'm aware of this solution. But the problem here is; the child form is not
in the same project. My child form is in a dll, therefore I can't cast it.
I
will not know the parent, since the child form is in a DLL.

"Sijin Joseph" <si***************@hotmail.com> wrote in message
news:OG**************@TK2MSFTNGP10.phx.gbl...
Try casting the ChildForm.Parent property to an instance of your parent
form, and then accessing the MainMenu of the parent from that object.

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

PK wrote:
> Hi,
> I've a MDI form and a child form that comes from a dll. Everything
> works
> fine until I had to uncheck or check a menu item in the MDI form based on > the changes in the child form. How to acheive this ? How can a child form > (that is in dll) access a menuitem in the main form ?
> Pl. help.
>
>
>


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.