473,795 Members | 3,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access MDI Form Menu Item from a child dll Form

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
3 5593
Try casting the ChildForm.Paren t 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
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******** ******@TK2MSFTN GP10.phx.gbl...
Try casting the ChildForm.Paren t 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
Have you tried using the Menu property of the parent Form object
("this.MdiParen t.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******** *****@TK2MSFTNG P11.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******** ******@TK2MSFTN GP10.phx.gbl...
Try casting the ChildForm.Paren t 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
4756
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much appreciated. Thanks in advance
1
4225
by: Martin Douglas | last post by:
Hey guys, maybe someone can help me with some MDI issues I have. A co-worker asked me a very simple question, one that I blew off as trivial, and it has become a time-consuming issue. Simply put, there is an MDIForm and a child form. The MDIForm does the usual from within its constructor... this.IsMdiContainer = true; Form2 frm = new Form2();
0
2232
by: Karthick Kumar | last post by:
Hi, I need to create a simple parent/child hierarchical menu. I have alread used the Treeview control but my requirement is slightly different than the Treeview control. I already have the kind of menu I am talking about, written in Classic ASP, but I need to write the entire menu thing in Asp.Net using CSharp. I have a Sql table which has large number of menu items with problemId and parentId, through which I am trying to create and...
4
2918
by: Kevin | last post by:
Hello. My app uses user-based menu generation where all of the menu items are loaded from a SQLServer 2k database when the user logs in to the app. All is well except I cannot get an Access Key to load programmatically. That is, one of my entries in the database is &File, so when the menu item loads it should display in the Main Menu with the "F" underlined, but it doesn't. If I edit the Main Menu via it's interface, it works... but that goes...
0
1327
by: Sakharam Phapale | last post by:
Hi All, I am developing an application which works similar to MS WORD. I have a main form which acts as MDI container and I am using a third party menu control so that it looks like XP style menu having image on left side of menu item. When using the standard menu bar, child form icon appears before the menu and in same level.
0
1146
by: Jake Wiley | last post by:
I need to enable a menu item on a parent based on the closing of a child form. I need help in general on how to let the parent know the child has closed. Here are the basic steps I've done: Menu item opens child form Menu item get disabled so user can't open another form User enters data into child form When user closes the child form the menu item gets enables again -- I need help with this part
1
2120
by: andreas | last post by:
I have a MDI form with a MdiList in a MenuItem And also 3 different child types, one child is like a background with a picturebox in it. So this must be always as background and never hide the others childs. But when I click in the MdiList on the "backgroundchild" the "backgroundchild hides the others child. Can I remove this child from the MdiList or is there a way that this child don't hide the others when clicking on it in the...
1
5830
by: mabond | last post by:
Hi I've noticed a couple of postings on this topic. I'm either not uderstanding them or I'm missing something. My app uses an MDIParent form (frmCAD). A menu item on frmCAD shows a child form (frmHistoricalCall). It also another menu item on frmCAD to "enabled = false", to prevent other forms being opened when frmHistoricalCall is in use. That menu item has it's modifier property set at "public".
0
1561
by: Rotsey | last post by:
Hi, I have a MDI form with child forms and a Window menu. When a new child form is created or closed I want to update the menu with a item for the child window. Problem is I have it adding the menu item ok but when the form is closed the item is not being removed.
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9037
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.