0
Hello
' Can i know that how to set contextmenustrip on treeviewnodes....
if you want to add contextmenustrip on only nodes of treeview
you can use this code:
For Each trv As TreeNode In TreeView1.Nodes
trv.ContextMenuStrip = ContextMenuStrip1
Next
Or
if you want to add only on child nodes,you can use this code:
For Each trv As TreeNode In TreeView1.Nodes
For Each Childtrv As TreeNode In trv.Nodes
Childtrv.ContextMenuStrip = ContextMenuStrip1
Next
Next
thanks
Please mark as answere if it helps