Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21243

Delete an element form a listbox using a popup menu

$
0
0
I want a "Delete" menu to pop up when the user right-clicks on a listbox to remove the selected element. However, in order to distinguish mouse buttons I have to use the Mouse_Down event which occurs before the click event so, no element has been selected yet.

How do I retrieve the listitem the mouse is on at the time of mouse_down? I guess the Sendmessage API function is the way to go but I don't know what are the necessary parameters to pass.

Viewing all articles
Browse latest Browse all 21243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>