-
menu
hey there,
I am new to .NET and am having trouble with menues.
I would like to put the same menu on aboout 10 forms, but do not want to create a menu on each form.
Is there a way to creat a component class and call it every time a form loads up so that it show the menu?
Thanx for your help.
-
create a class a pass the current form to it to create the menu in the form_load event
Dim mymenu as new cMenu
cMenu.AddMenu
Public Class cMenu
Friend Sub AddMenu(frmCallingForm as Form)
DECLARE MENU ITEMS
frmCallingForm.Menu.MenuItems.Add (YOUR MENU OBJECT)
End Class