Advertisement
2_2002-2004 Miscellaneous #118169

Search for a string in Listbox

Search for string in listbox

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Private Sub Form_Load()
  'KPD-Team 1998
  'URL: http://www.allapi.net/
  'E-Mail: KPDTeam@Allapi.net
  'Add some items to the listbox
  With List1
    .AddItem "Computer"
    .AddItem "Screen"
    .AddItem "Modem"
    .AddItem "Printer"
    .AddItem "Scanner"
    .AddItem "Sound Blaster"
    .AddItem "Keyboard"
    .AddItem "CD-Rom"
    .AddItem "Mouse"
  End With
End Sub
Private Sub Text1_Change()
  'Retrieve the item's listindex
  List1.ListIndex = SendMessage(List1.hwnd, LB_FINDSTRING, -1, ByVal CStr(Text1.Text))
End Sub
Original Comments (3)
Recovered from Wayback Machine