Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello,
In my application i have provided multitasking environment..so user can open number of different forms at a time(means Suppose user have open a sale bill form and now he can open purchase bill form or credit note form).If user opened two or more form then it is difficult to navigate between forms. So for this i have created a Windows Menu and i am trying to add instance of form(which is open) as sub menu o Windows menu(Just like Windows Menu in Ms Word) .After that i am trying to remove the sub menu item, if the form is closed.
What to do for this?
Pls Help
Posted

1 solution

Hi Yatin,

if all the different forms are opened from the main application window it should be pretty much straight forward. When a form is opened you:

1. add it to the menu and store which form belongs to which menu entry
2. attach a form.Closed event handler to the form
3. When a form is closed event from 2. will fire. Look up which menu entry belongs to the form that fired the event and remove it from your menu.

Storage of information could be as simple as:
Dictionary<form,MenuEntry> dictFormEntry = new ...
...
dictFormEntry.Add(myBillingForm, menuEntry);
...


Hope this will give you some ideas!


Cheers

Manfred
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900