[Originally posted by angiras]

I have created aÿ class :

----------------------------------

ÿ  Public Class menu : Inherits MainMenu

ÿ ÿ ÿ Sub New()
ÿ ÿ ÿ ÿ  MyBase.new()
ÿ ÿ ÿ ÿ  Dim sItem As String
ÿ ÿ ÿ ÿ  For Each sItem In listItems()
ÿ ÿ ÿ ÿ ÿ ÿ Me.MenuItems.Add(sItem)
ÿ ÿ ÿ ÿ  Next
ÿ ÿ ÿ End Sub

ÿ ÿ ÿ Private Function listItems() As StringCollection

ÿ ÿ ÿ ÿ  Dim sc As New StringCollection

ÿ ÿ ÿ ÿ  sc.Add("file")
ÿ ÿ ÿ ÿ  sc.Add("parameters")
ÿ ÿ ÿ ÿ  sc.Add("help")

ÿ ÿ ÿ ÿ  Return sc

ÿ ÿ ÿ End Function

ÿ  End Class

----------------------------------

I want on each winForm this menu :

----------------------------------


Private mnu As New angiras.menu

Private Sub mainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ÿ ÿ ÿ Me.Controls.Add(mnu)
ÿ  End Sub


----------------------------------

it doesn't work

how can I add my menu into a winform ?

thank you