PDA

View Full Version : Clicking in the empty area of a listbox



snorkyller
02-06-2011, 11:56 AM
Hi,

In my Access db, there's a window containing a listbox that opens, and that let you select a 'Client'. I want to let the user to select it by double clicking it in the listbox, and then automatically close the window. But I would not do it if the user double click in the empty area of the list box : as usual, the current selection would be erased and nothing would happen. I have trouble with this part : 'cause in access, the selected item still selected when you double click in the empty area, and the DblClick event is of course also called in that case. So I don't see any way to know, in the code, if the user double-clicked an item or the empty area. :think:

I wonder if it's possible to know the position, in the screen, of the listbox item's. So I could use the MouseDown event to know If the user double clicked on an item or in the empty area.

If you have any suggestions or idea, I'd be glad if you let me know. :)
Thank you!