1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long
Private Sub Form_Load()
Combo1.Clear
Combo1.AddItem "Tomates"
Combo1.AddItem "bananes"
Combo1.AddItem "tubercules"
Combo1.AddItem "biscuits"
Text1.Text = ""
End Sub
Private Sub Text1_Change()
Combo1.ListIndex = SendMessage(Combo1.hwnd, &H14C, -1, ByVal Text1.Text)
End Sub
Private Sub Combo1_Change()
Combo1.ListIndex = SendMessage(Combo1.hwnd, &H14C, -1, ByVal Combo1.Text)
End Sub |
Partager