Search List Box - Possible Solution 
Author Message
 Search List Box - Possible Solution

After Experimenting a little bit I found that

the SendMessage(ListboxHwnd,LB_FindString,-1,ByVal Cstr(TextToSearchFor))
works if

In the declare you declare sendmessage like

Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

And not like

'(This Was Taken From API Viewer [apilod32.exe])
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long

the principle difference is to give the lParam an 'As Any' data type as
opposed to 'As Long'

this has only been tested in VB4 32 Bit


Hope It Works For You

Simon Carter

----------------------------------------------------------------------------
----------------
Do You Program In VB4 (32 Bit)!
Try Using SC4VB Its Designed To Make Your Life Easier.  Includes Resource
Editor,Project/Object Repository's, Source Code, HelpFile,Tips Plus Much

Or Download From
http://www.*-*-*.com/
http://www.*-*-*.com/
----------------------------------------------------------------------------
----------------



Mon, 03 May 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Search List Box - Possible Solution

2. List box search based on text box entry...

3. List QueryDefs in a Combo Box - Is It Possible

4. Overflow error & possible list box connection

5. Using List box for directory tree possible?

6. ? on list boxes - is it possible

7. List/Search Box VBX Library

8. Search Databound List Box

9. DbCombo box Search List

10. searching list boxes?

11. Help: Search Text In List Box

12. List Box incremental search.

 

 
Powered by phpBB® Forum Software