vb.net - VB .net Context/ToolStripMenu at runtime -


i have contextmenu in this picture. want add says ".rtf" more menuitems @ runtime. cant seem make it...

dim mycontextmenu contextmenustrip = form1.mnuoptions dim mymenuitem toolstripmenuitem = mycontextmenu.items("sendto") dim mysubmenuitem new toolstripmenuitem = mymenuitem.dropdownitems("file").subitems 

this how imagine doing it, not work of course because there no ".subitems". take accomplish such easy job?

and how can set addhandlers each subitem procedure?

assuming 'file' name of menu item text, can access directly it's name, , add dropdown item collection:

file.dropdownitems.add("pdf") 

one of add overloads allows indicate event handler click fire.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -