درود;
داداش ببین این کد به دردت میخوره ؟
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
' Create the list to use as the custom source.
Dim MySource As New AutoCompleteStringCollection()
MySource.AddRange(New String() _
{ _
"January", _
"February", _
"March", _
"April", _
"May", _
"June", _
"July", _
"August", _
"September", _
"October", _
"November", _
"December" _
})
' Create and initialize the text box.
Dim MyTextBox As New TextBox()
With MyTextBox
.AutoCompleteCustomSource = MySource
.AutoCompleteMode = AutoCompleteMode.SuggestAppend
.AutoCompleteSource = AutoCompleteSource.CustomSource
.Location = New Point(20, 20)
.Width = Me.ClientRectangle.Width - 40
.Visible = True
End With
' Add the text box to the form.
Me.Controls.Add(MyTextBox)
End Sub
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
باید یه Range تعریف کنی
حالا که میخوای مقادیر دیتابیس رو توش AutoComplete بدی اول یه آرایه بگیر که این مقادیر رو بریزی توش . بعد یه For بگیر از 0 تا Count آرایه ، بعد تو AddRange همه رو Add کنشون .
اینطوری TextBox یا ComboBox شما زمان AutoComplete هر چی که شما بهش دادی رو نشون میده .
یا این که تو Item Collection کنترل ComboBox تمامیه مقادیر رو دستی وارد کن و AutoCompleteSource ر و بزار رو List Item
اگه منظورت این نیست بگو باز توضیح بدم