|
-
Dec 12th, 2005, 05:46 AM
#1
Thread Starter
Fanatic Member
-
Dec 12th, 2005, 05:54 AM
#2
Re: search "a" automatically output all starts from "a..."
Try a search for 'Listbox Autocomplete' as there are a few different approaches
-
Dec 12th, 2005, 06:03 AM
#3
Thread Starter
Fanatic Member
Re: search "a" automatically output all starts from "a..."
Bruce! 'Listbox Autocomplete' is another component to use? can u provide more complete info. but tnx...
-
Dec 12th, 2005, 09:15 AM
#4
Re: search "a" automatically output all starts from "a..."
 Originally Posted by noielen
Bruce! 'Listbox Autocomplete' is another component to use? can u provide more complete info. but tnx...
No, it is code. Here is an example using a textbox to autocomplete searching a ListBox.
VB Code:
Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _
lParam As Any) As Long
Private Const LB_FINDSTRING = &H18F
'Add a textbox above the listbox. Call it txtSearch
Private Sub txtSearch_Change()
List1.ListIndex = SendMessage(List1.hwnd, LB_FINDSTRING, -1, ByVal CStr(txtSearch.Text))
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|