Hi. I used the following code to disable the cursor over the listbox (try to still have the scrolling function for the listbox but disable its clicks).

Code:
Private Sub List1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)

ListBoxToolTip List1, y, "(empty)"
    If (x < 0) Or (y < 0) Or (x > List1.Width) Or (y > List1.Height) Then
       ReleaseCapture
       ShowCursor 1
    ElseIf GetCapture() <> List1.hwnd Then
       SetCapture List1.hwnd
       ShowCursor 0
       End If
       
End Sub
However, when I tested again today, found the listed items could be selected still and once one is selected, the cursor disapares totally, not just within the listbox. Anything wrong? Can anyone help? or any other better solutions for this??

Thanks.