Главная » Статьи » Програмування » Visual Basic (vb) | [ Добавить статью ] |
Поиск элемента в ListBox
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Any) As Long Const LB_FINDString = &H18F Private Sub Form_Load() List1.AddItem "111" List1.AddItem "222" List1.AddItem "228" List1.AddItem "2291" List1.AddItem "2293" List1.AddItem "2297" End Sub Private Sub Text1_Change() List1.ListIndex = SendMessage(List1.hwnd, LB_FINDString, -1, ByVal CStr(Text1.Text)) End Sub | |
Просмотров: 719 | |
Всего комментариев: 0 | |