Using VB6 (for two weeks!)
I could get a ListBox search working perfectly but with a ListView it has
completely stumped me. I've not found any previous posts that have helped :(
The user enters a string into a text box (txtStreet) and as they type any
matching entry in the listview (lsvStreets) is highlighted and made visible.
The search highlights the first item starting with the text in txtStreet.
The listview contains 6,000 rows of 7 columns, only the first column is
relevent in any search.
With the ListBox I was using...
Private Declare Function SendMessage Lib "User32" _
Alias "SendMessag eA" (ByVal _
hWnd As Long, _
ByVal wMsg As Integer, _
ByVal wParam As String, _
lParam As Any) As Long
Const LB_FINDSTRING = &H18F
And in the txtStreet_Chang e function:
MsgBox SendMessage(lsv Streets.hWnd, LB_FINDSTRING, txtStreet ByVal
txtStreet.Text)
I'm going round the web looking for examples, tutorials, etc but so far
nothing has helped or worked.
Thanks.
I could get a ListBox search working perfectly but with a ListView it has
completely stumped me. I've not found any previous posts that have helped :(
The user enters a string into a text box (txtStreet) and as they type any
matching entry in the listview (lsvStreets) is highlighted and made visible.
The search highlights the first item starting with the text in txtStreet.
The listview contains 6,000 rows of 7 columns, only the first column is
relevent in any search.
With the ListBox I was using...
Private Declare Function SendMessage Lib "User32" _
Alias "SendMessag eA" (ByVal _
hWnd As Long, _
ByVal wMsg As Integer, _
ByVal wParam As String, _
lParam As Any) As Long
Const LB_FINDSTRING = &H18F
And in the txtStreet_Chang e function:
MsgBox SendMessage(lsv Streets.hWnd, LB_FINDSTRING, txtStreet ByVal
txtStreet.Text)
I'm going round the web looking for examples, tutorials, etc but so far
nothing has helped or worked.
Thanks.
Comment