If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > How to Search Combobox using SendMessage API

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-07-03, 22:53
svakula svakula is offline
Registered User
 
Join Date: Feb 2003
Posts: 6
Lightbulb How to Search Combobox using SendMessage API

How to Search for an item in the Combo Box using Send Message API function. i know how to use it for a list box, but it is not working for ComboBox even i change the parameter to "CB_FINDSTRING"
Pls help me
Reply With Quote
  #2 (permalink)  
Old 02-10-03, 09:56
Bruce A. Baasch Bruce A. Baasch is offline
Registered User
 
Join Date: Nov 2002
Location: Ohio
Posts: 90
Hi svakula,

If your API call isn't working...try this:

On Error Resume Next
yourcombobox.Text = yourstring
On Error Goto 0
If yourcombobox.Text = yourstring Then
' we found it - do something
Else
' we didn't find it - do something
EndIf

It's almost as fast as the API call and you still have control over the "not found" condition.

Good Luck,
__________________
Bruce Baasch
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On