Code Repo    |     RSS
MD's Technical Sharing



Saturday, January 24, 2009

Show a Listview's context menu at the location of the selected item

Me.ContextMenu1.Show(PointToScreen(New Point(Me.ListView1.FocusedItem.Position.X, Me.ListView1.FocusedItem.Position.Y + Me.ListView1.Location.Y)))


An alternative is to post a WM_RBUTTONDOWN message to the control.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.