Automatically Select ListBox Item when the Mouse is Over It

Category:
Forms and Controls
Type:
Snippets
Difficulty:
Intermediate
Author:
Chong Long Choo

Version Compatibility:

More information:
Call this function, passing the list box's hwnd, x, and y, from the list box's mousemove event, and the item the mouse is over will be selected.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: