I've got a basic email application set up, and I'd like the "To" field (TextBox1) to be an autocomplete textbox.
I'd also like the user to be able to edit what their contacts are, and so be able to add named to the autocomplete suggestions.
I can get TextBox1's autocomplete suggestion to come from TextBox2's current Text - however this means I can only have one name as a suggested contact.
Ideally, something like a list box would be ideal, so the user can add and remove names, and this list would then provide the source for the autocomplete.
For some reason, I'm having difficulty making it work - I think I'm assigning the wrong names to the wrong things. Would you be able to clarify which textboxes I should name as what?
My ListBox is being populated when the form is running, by the user entering the info into TextBox2, pressing a button and the option appearing in the listbox.
However, without editing the code, TextBox1 will not autocomplete.
Thanks for your prompt reply and apologies for mine taking ages!
Can you clarify where that new code should go?
I'm using the project you uploaded which was designed for saving contacts, and am getting the "GetItemText is not a member of System.Windows.Forms.Listview"... error.
And when I swap in the
vb Code:
For Each contact As ListViewItem In Me.lvwMyListView.Items
MessageBox.Show(contact.Text)
Next
where I think it should be, it means the form no longer works.