In ListBox Control of Windows Forms, If I set a ContextMenuStrip to be shown on a MouseDown Event on an Item, The ContextMenuStrip will be shown but the Item where I click the right button will not be selected.. The Items can be selected only when I click with the left button..
In a DataGrid view I can fix that with the HitTest() method to check which item is on the current location and then select it and then show the ContextMenuStrip. but unfortunately in ListBox there is not HitTest Method..
Is There a way?
You can use the
IndexFromPointmethod: