15,916,462 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11410248 (Top 4 by date)
Member 11410248
24-Aug-15 20:35pm
View
ex) Mainmenu
Parent Menu-> fruit(textname) f1(name)
Child Menu-> banana(textname) b1 (name)
Child Menu-> melon(textname) m1 (name)
Child Menu-> apple(textname) a1 (name)
I want to get b1, m1, a1 in Mainmenu_name
This is that I want to achive.
Can you help me?
Member 11410248
24-Aug-15 9:58am
View
It was wrong one..
sorry I put the code again..
1.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LoopMenu(MainMenu1)
End Sub
Private Sub LoopMenu(ByVal Parent As Menu)
Dim getname As String
Dim mnuChild As MenuItem
For Each mnuChild In Parent.MenuItems
getname = mnuChild.Name
Call LoopMenu(mnuChild)
Next
End Sub
End Class
2.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.SetMenuItemStates(MainMenu1.MenuItems)
End Sub
Private Sub SetMenuItemStates(ByVal items As MainMenu.MenuItemCollection)
Dim a As String
For Each item As MenuItem In items
a = item.Name
Me.SetMenuItemStates(MainMenu1.MenuItems)
Next item
End Sub
--------------------------------------
I have two code.. but both of them are not working at all..
I want to get name in tmmenu from mainmenu.
ex) mainmenu
fruit (this is menu)
-> banana(textname) a1 (name)
-> melon(textname) a2 (name)
-> apple(textname) a3 (name)
Member 11410248
24-Aug-15 8:37am
View
Can you help me to correct this code?
Member 11410248
24-Aug-15 8:36am
View
Can you help me to correct this code?