|
-
Nov 5th, 1999, 02:15 AM
#1
Thread Starter
Hyperactive Member
I would like to create a list box similar to those in help files where you have a list of all available topics, and then you have a text box at the top, and as you type it highlights any matching entries. How would you do this? Please give code, if you can. Thank you.
------------------
Ryan
[email protected]
ICQ# 47799046
[This message has been edited by Gimpster (edited 11-05-1999).]
-
Nov 5th, 1999, 03:35 AM
#2
Guru
There's a function which does this which is built into the ListBox. Unfortunately, it isn't built into the Visual Basic ListBox. But you can still use it, indirectly:
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
Private Sub Text1_Change()
List1.ListIndex = SendMessage(List1.hWnd, LB_FINDSTRING, -1, ByVal Text1.Text)
End Sub
------------------
Yonatan
Teenage Programmer
E-Mail: [email protected]
ICQ: 19552879
[This message has been edited by Yonatan (edited 11-05-1999).]
-
Nov 5th, 1999, 04:50 AM
#3
Thread Starter
Hyperactive Member
Thanks, it works great!
------------------
Ryan
[email protected]
ICQ# 47799046
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
|