在vb.net文本箱中,我完成了汽车的安装,但有一个问题,即当用户类型在文字箱中的东西时,汽车完整建议清单的链接就消失了,如重点改变。
该守则是:
Dim Bl As New ItemBL
Dim suggestions = DAL.DisplayLikeNameList(Trim(MyTextBox.Text))
Dim MySource As New AutoCompleteStringCollection()
MySource.AddRange(suggestions.ToArray)
With MyTextBox
.AutoCompleteCustomSource = MySource
.AutoCompleteMode = AutoCompleteMode.Suggest
.AutoCompleteSource = AutoCompleteSource.CustomSource
End With
End If
我认为,Mdi形式的问题,因为它有超时的法典在上述法典之后执行:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
LblDateAndTime.Text = Now
End Sub
Note: the auto complete code is executed in a child form not in the Mdi Form , what do you suggest to keep suggestions list "sticky" as the user writing in the text box ??