473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Dynamically generating menu using reflection

I have an application which has a MDI parent form and a simple menu bar.
Using reflection I can get access to other assemblies and add an item to my
parent menu which when clicked opens up the main form of the assembly.
Within this new window I can run my application as normal.
The problem is that I do not want the child application to have its own
menu. I want the parent form to add items for every form which exists in the
child.

I am completly baffled by this and was hoping for some pointers.

Thanks inadvance
Mar 14 '06 #1
1 1019
Here's how I would do it....

When the child window is opened, set a variable of the parent to a value.
Then when the menu is clicked (the one you always see, not the ones that are
in the pulldown) check the variable and based on the value 'it' will know
how the pulldown menu should be for this child window.

I don't know if this is the 'perfect' way of programming, but it works for
me.

rg,
Eric
"poppy" <po***@discussions.microsoft.com> schreef in bericht
news:64**********************************@microsof t.com...
I have an application which has a MDI parent form and a simple menu bar.
Using reflection I can get access to other assemblies and add an item to
my
parent menu which when clicked opens up the main form of the assembly.
Within this new window I can run my application as normal.
The problem is that I do not want the child application to have its own
menu. I want the parent form to add items for every form which exists in
the
child.

I am completly baffled by this and was hoping for some pointers.

Thanks inadvance

Mar 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nikki | last post by:
Hi, I m developing a Windows application in which i want to create a context menu, having variable number of submenus depending on the the list in the file. I m able to create these submenus at...
4
by: Shiju Poyilil | last post by:
Hello EveryBody, I have a dropdownlist with some values as .net server controls & a button , on clicking a button i need to generate the choosen contorl dynamically. I am giving a small glimpse...
1
by: Andy Fish | last post by:
Hi, In my aspx web application, I am generating a list of items in a menu down the left-hand side. Different items in the list may have different controls in, and this is data-driven at runtime....
7
by: pmclinn | last post by:
I was wondering if it is possible to dynamically create a structure. Something like this: public sub main sql = "Select Col1, Col2 from Table a" dim al as new arraylist al =...
3
by: Benny Raymond | last post by:
Does anyone know off hand if dynamically compiled C# is debuggable in ..net 2.0?
7
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
4
by: =?Utf-8?B?QWJoaQ==?= | last post by:
I am using Reflection to invoke methods dynamically. I have got a special requirement where I need to pass a value to method by setting the custom method attribute. As I cannot change the...
8
by: =?Utf-8?B?U2hhd24=?= | last post by:
Hi; i just started research reflection and i'm wondering if i have an empty class file can i use reflection to add member variables and attributes dynamically and then instantiate the class? What...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.