Selecting Items in List Box control programmatically...
Hi ,
I have created list box with the property Multiselect= 2-extended.
I thought I can select more than one Item in the list box programmaticaly using the following code, but it is not working.
For i= 2 to SelctedVal
retval = SendMessage(lstNotLinked.hWnd, LB_SETSEL,
ByVal CLng(1), ByVal CLng(i))
Next i
Can some body please tell me whether it is possible OR not.
Since I am new to VB, I am not very sure of VB 6.0 capabilities.
If any of you know how to select the list box items (more than one) programmatically then please let me know.
Thank You very much........
Selecting Items in List Box control programmatically...
The foloowing code just select the item, but the items do not get hilighted in the list box. i.e I wanted to see those selcetd Items (List1.Selected(i) = True) as hilighted in the list box.
For i = 0 To List1.ListCount - 1 Step 2 'select every other element
List1.Selected(i) = True
Next i
Thank you...
SESHU