VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Listbox selection with Right Click (using LBITEMFROMPOINT)

Jason Sawdey  (1 Submission)   Miscellaneous   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Allows selection of listbox items with right-click. *Not trying to get any votes, just sharing help I've provided in VB Discussion forum to everyone. Enjoy.*

Assumes
Just add a listbox with the default name of List1 to the form, and paste the code into the form.

API Declarations
Private Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Private Const LB_ITEMFROMPOINT = &H1A9

Rate Listbox selection with Right Click (using LBITEMFROMPOINT) (6(6 Vote))
Listbox selection with Right Click (using LBITEMFROMPOINT).bas

Listbox selection with Right Click (using LBITEMFROMPOINT) Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters