문제

I would like to iterate over all items in a ContextMenuStrip.

Can somebody please help me out here?

I was trying this, but it didn't work out:

For Each it As ToolStripItem In Me.ContextMenuStrip1.Items

Thank you!

도움이 되었습니까?

해결책

The error is pretty clear to me =). Add the word Next where your loop ends.

For Each it As ToolStripItem In Me.ContextMenuStrip1.Items
    'Loop Contents
Next
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top