Hi All![]()
I have something like this
VB Code:
Option Explicit Private Declare Function SendMessage Lib "user32" Alias _ "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As _ Long, ByVal wParam As Long, lParam As Any) As Long Const LB_ITEMFROMPOINT = &H1A9 Private Sub Form_Load() List1.AddItem "Marina" List1.AddItem "Phill" List1.AddItem "Karla" List1.AddItem "Mark" List1.AddItem "Antonio" List1.AddItem "Theo" List1.ListIndex = 0 End Sub Private Sub List1_MouseMove(Button As Integer, Shift As Integer, _ X As Single, Y As Single) Dim P&, LX&, LY&, Param& LX = List1.Parent.ScaleX(X, List1.Parent.ScaleMode, vbPixels) LY = List1.Parent.ScaleY(Y, List1.Parent.ScaleMode, vbPixels) Param = CLng(LX) + &H10000 * CLng(LY) P = SendMessage(List1.hwnd, LB_ITEMFROMPOINT, 0, ByVal Param) If P < List1.ListCount Then List1.ListIndex = P End Sub
how to switch off procedure (Private Sub List1_MouseMove) after clicking on a chosen an item. I not want after chosen and clicking on a some item to highlight it already other of item in this list.
Thanks in advance




Reply With Quote