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
Post a Comment