-
mainMenu class
[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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks