index > Windows Forms General > How can I catch the event that occur before a item is selected in System.Windows.Forms.ListBox control?
How can I catch the event that occur before a item is selected in System.Windows.Forms.ListBox control?
Even MouseDown event is fired after a item is selected. I cannot find an earlier event any more. Is there an corresponding event or any event that can indicate this? Thank you!
tankbattle Thursday, May 31, 2007 3:19 AM
Use MouseMove() and ListBox.IndexFromPoint() to see the mouse over the item before it is selected.
nobugz Thursday, May 31, 2007 6:39 PM
So the last option will be MouseHover event which occurs when the mouse remains stationary inside of the control for an amount of time.
Moayad Mardini Thursday, May 31, 2007 6:33 AM
Thank you for your reply. Though the answer is not desirable. Right now, this problem is not serious for me since I've found a work-around.
tankbattle Thursday, May 31, 2007 6:38 AM
Use MouseMove() and ListBox.IndexFromPoint() to see the mouse over the item before it is selected.