English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

(VB2005)
Sub menus are children of the Parent menu item which contains them. So a top level menu item should have (nothing) as its Parent (or OwnerItem) property.

Sub menu items will have the name of the menu item which contains them as their OwnerItem property.

If you place a toolstripmenu on a form and create several menu and sub menus you can place the following lines of code in eack menu items click event to look at its owner in debug mode.

Dim mnuItm As ToolStripMenuItem
mnuItm = sender
Debug.Write(mnuItm.OwnerItem)

Note that mnuItm is a ToolStripMenuItem and NOT a MenuItem. If you use the wrong object type a cast exception will be thrown because these are two different object types.

2007-09-09 01:07:13 · answer #1 · answered by MarkG 7 · 0 0

just try this to make menu in vb ..
goto create menu....
write first name of menu>enter>click on button(...)>enter sub menu name>enter>click on buttom(...)>enter second sub menu..
i have interst in vb...
send me e-mail if you like to share knowladge of vb....
milandevmani321@yahoo.co.in

2007-09-08 19:23:54 · answer #2 · answered by Devmani milan 2 · 0 0

When any menu is created as submenu then behind that menu some dots(.) appears.
Like this -
MainMenu
.....SubMenu
..........Subsubmenu

2007-09-08 19:12:11 · answer #3 · answered by Sachin 2 · 0 1

fedest.com, questions and answers