hmm i have solved that problem in the past like this
Dim menuStrip As Contexmenu= DirectCast(Form1.Controls.Find(menuname, True)(0), Contexmenu)
menuStrip.Enable=True
I tried like what u give
' Dim menuStrip As ContextMenu = DirectCast(Form1.Controls.Find(menuname, True)(0), ContextMenu)
menuStrip.Enabled = True '
but it shows the error like below
"value of type 'System.Windows.Forms.Control' cannot be
converted to 'System.Windows.Forms.ContextMenu'".
please tell me what should i do?
thanks