liversen
asked on
Hide a child form from the parents "Window" menu
Hi
This might be a stupid question but I can't figure it out my self.
I have a VB net 2005 app with an MDI parent which has been added to the project(Including menu structure)
It has a "Window" menu in which I can select Cascade etc. This "Window" menu also contains a list of the child windows that are open.
Now I would like for one of my child windows not to have an entry in the "Window" menu.
How do i do that?
Thanks in advance
This might be a stupid question but I can't figure it out my self.
I have a VB net 2005 app with an MDI parent which has been added to the project(Including menu structure)
It has a "Window" menu in which I can select Cascade etc. This "Window" menu also contains a list of the child windows that are open.
Now I would like for one of my child windows not to have an entry in the "Window" menu.
How do i do that?
Thanks in advance
This "Window" menu that you speak of, Is this a contextmenu that you have added to the project? Or are you refering to the built in context menu that opens when you right click on the form's titlebar?
ASKER
It is just a mdi form I added to the project using Add New Item and selecting mdiForm
It then comes with its own context menu that has one item called Windows.
It contains by default:
New Window
Cascade
Tile Vertical
Tile Horizontal
Close All
Arrange Icons
____________________
<MDI CHILD 1 NAME>
<MDI CHILD 2 NAME>
<MDI CHILD 3 NAME>
I can not find any code that adds the <MDI CHILD X NAME> to the menu, It's kind of just happening
and I need to make sure that e.g. <MDI CHILD 2 NAME> is not shown in the list.
It then comes with its own context menu that has one item called Windows.
It contains by default:
New Window
Cascade
Tile Vertical
Tile Horizontal
Close All
Arrange Icons
____________________
<MDI CHILD 1 NAME>
<MDI CHILD 2 NAME>
<MDI CHILD 3 NAME>
I can not find any code that adds the <MDI CHILD X NAME> to the menu, It's kind of just happening
and I need to make sure that e.g. <MDI CHILD 2 NAME> is not shown in the list.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Nice gearboxpc...we can only make decisions based on the Text of the MenuItem itself though. We don't have any knowledge of the TYPE of the Form that the MenuItem points to...and for some apps that change the Caption of the form this might not be enough.
Thanks ~ Idle_Mind... If you re-read the question from liversen and then check my comment / solution... you will see it does just what liversen asked for. I am trying to keep it simple and stick to the question. :)
I didn't say your solution doesn't do what the author asked for. =(
Have I somehow strayed off question? =\
I'm merely stating that it would only work if the caption of the form is static or somehow predictable... =)
(not always the case)
Have I somehow strayed off question? =\
I'm merely stating that it would only work if the caption of the form is static or somehow predictable... =)
(not always the case)
ASKER
Hi
I'm choosing to go for the solution by gearboxpc because it is simple and it does what I need. In my case the form does not change name/caption so I can use the simple solution.
On the other hand I can see Idle_Mind's point about solving it by populating the menu all manually.
Thanks to both of you
I'm choosing to go for the solution by gearboxpc because it is simple and it does what I need. In my case the form does not change name/caption so I can use the simple solution.
On the other hand I can see Idle_Mind's point about solving it by populating the menu all manually.
Thanks to both of you