vb.net - Why i cannot find context menu strip in my form? -


i'am trying find context menu strip in form code doesnt seem displayed desired output...here code:

dim omnustrip() object = ocollection.controls.find("mnustrip", true) dim mnustrip_ contextmenustrip = directcast(omnustrip,contextmenustrip) mnustrip_.tag = "my control" 

it return empty array of objects...am doing wrong here? please help..thanks!

contextmenustrips added components, not controls, that's why empty array.

dim strip contextmenustrip = nothing  each component object in components.components     strip = trycast(component, contextmenustrip)     if strip isnot nothing exit next 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -