Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Direction/help needed with forms and menus

Status
Not open for further replies.

stillwillyboy

Technical User
Jan 22, 2004
165
US
I’ve looked through past posts and maybe I saw the answer, but I am not sure.

I am wanting to use multiple forms that use the same menu. In other words, the menu items would be the same across the top of the form for ALL forms (including a “StartUp Form”). This is pretty basic Windows stuff, but I am not sure what direction to approach it from. I’ve created the forms and attached some code, but quickly found out that every form would have to reference every other form. There has to a better way.

The StartUp Form (and all other forms) menus would look like:

Worker Jobs Timesheets Process Reports Admin Exit

When the user selected either the Worker, Jobs or Timesheets item on the menu, from ANY active form, including the StartUp Form, a drop down with the selections Add, Change, Delete would appear, the user would make their selection and the appropriate form for Adding, Changing and/or Deleting would appear.

The Process, Reports and Admin items would not have the Add, Change, Delete, but would have their own items. But the basic process would be the same and I would still need to be able to access them form the other menu items.

Q’s:
Would I use the StartUp Page as Parent form and open each other form as a child?

Would I use Class coding for the events?

Is this a DLL situation?

Is this a “hosting form” issue?

I have looked at the following items in Help (plus a bunch of others), but am not sure what direction to take.

MenuItemTemplateContainer Class
MenuItemTemplateContainer.DataItem Property
MenuItemTemplateContainer.ItemIndex Property
ToolStripDropDownItem.DropDownItemClicked Event

Also, I created three separate forms for the Add, Change and Delete functions. I really don’t need three different forms do I? Just one form with code that only allows the proper function, such as Add, Change and/or Delete.

Like I said, its pretty basic Windows stuff, I just don’t know the best and easiest way to accomplish the task. Any help/direction would be greatly appreciated.

TIA.

Bill

 
have you tried adding the menu items to a base form and then inheriting the base form through the other forms??

You can also solve the problem by specifing the Start Up page as a parent form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top