Hi Hack.
Thanks for quick reply![]()
I made a bit in other way, because in this code that you gave me this does not want to work like I want.
I make it (blnHasSelected = True) in event Mouse_Up because this Click event it happens already in Load event. However I made again the work for this procedure in event Mouse_Move for Form. I seem me that I made it okay. It fine work for me.
have a look, only in this a bit the code:
VB Code:
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) blnHasSelected = False End Sub Private Sub List1_MouseMove(Button As Integer, Shift As Integer, _ X As Single, Y As Single) If blnHasSelected = False Then '<<< it I changed here on a False 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 If End Sub Private Sub List1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) blnHasSelected = True End Sub
Again very thanks, Hack




Reply With Quote