473,386 Members | 1,610 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

autocomplete?

The "Run program" dialog and the Internet explorer adress bar got the
autocomplete effect, where what you type is matched against previous visited
adresses.

Anybody know how can i create a textbox/listbox that will have this effect
in my own program?
Nov 20 '05 #1
4 2417
On 2004-01-27, Jarod_24 <ja******@hotmail.com> wrote:
The "Run program" dialog and the Internet explorer adress bar got the
autocomplete effect, where what you type is matched against previous visited
adresses.

Anybody know how can i create a textbox/listbox that will have this effect
in my own program?


You will want to look at the ListBox's FindString method...

Off the top of my head and untested - so you may need to tweak it a
little :)

Private Sub textBox1_KeyUp(ByVal Sender As Object, ByVal e As KeyEventArgs)
Dim index As Integer
Dim start As Integer

If textBox1.Text.Length <> 0 AndAlso e.KeyCode <> Keys.Back Then
start = textBox1.SelStart
index = listBox1.FindString(textBox1.Text, -1)

If index <> ListBox.NoMatches Then
listBox1.SelectedIndex = index
textBox.Text = CType(listBox1.Items(index), String)
textBox.Select(start, textBox1.Text.Length - start)
End If
End If
End Sub

Not sure if this is exactly what you wanted or not...

--
Tom Shelton [MVP]
Nov 20 '05 #2
I haven't tested this example yet, but the feedback seems good:

http://www.codeproject.com/vb/net/au...e_combobox.asp

HTH,

Trev.

"Jarod_24" <ja******@hotmail.com> wrote in message
news:3e******************************@news.teranew s.com...
The "Run program" dialog and the Internet explorer adress bar got the
autocomplete effect, where what you type is matched against previous visited adresses.

Anybody know how can i create a textbox/listbox that will have this effect
in my own program?

Nov 20 '05 #3
* "Jarod_24" <ja******@hotmail.com> scripsit:
The "Run program" dialog and the Internet explorer adress bar got the
autocomplete effect, where what you type is matched against previous visited
adresses.

Anybody know how can i create a textbox/listbox that will have this effect
in my own program?


<http://www.google.com/groups?as_q=autocomplete%20combobox&as_ugroup=*dot net*>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
> The "Run program" dialog and the Internet explorer adress bar got the
autocomplete effect, where what you type is matched against previous visited adresses.

Anybody know how can i create a textbox/listbox that will have this effect
in my own program?


My Dinky AutoComplete Tool provides what you're looking for
http://dact.lamarvin.com/


Palo

--
http://dact.lamarvin.com - Dinky AutoComplete Tool for .NET
http://www.vbinfozine.com - An ordinary VB developer's successes and
failures
Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: bc | last post by:
Hi, Is it possible to detect if the IE autocomplete function in a current context such as a textbox is activated (ie. dropdown with previously entered info is visible)? Problem: I use a script...
40
by: Alex | last post by:
Hello, does anybody know how to turn off the autocomplete feature for a certain text field? I am aware of the "autocomplete" attribute, but I have seen other implementions achieving it...
0
by: Thorsten Ottosen | last post by:
Hi, I'm using the AutoComplete attribute to control transactions. What happens if I call functions with the AutoComplete attribute from within other functions with the AutoComplete attribute?...
8
by: moondaddy | last post by:
I have a form for entering a user's address and all fields have a required validating control associated with them and the error msg for each field displays right next to it. The normal behavior...
2
by: Mrinal Kamboj | last post by:
Hi , Need to get some basic info regarding AutoComplete Attribute in COM+ . I am having a class with TransactionOption set to Required , now for this class , can i mark all the methods with...
1
by: thubba2000 | last post by:
We have a web application developed using IBuySpy. In older versions, Autocomplete on all web forms works. In our latest version, it stopped working on all clients. I have gone through all the...
1
by: rbg.net | last post by:
I know that there is a autocomplete property for the HTML "INPUT type=text" control which if set to OFF, disables autocomplete of the input textbox (doesn't remember previously entered values) ...
8
by: nil | last post by:
Hello all, It's urgent... i want to add autocomplete textbox facility in my application like google. as you type it suggests option to the user..i want the same kind of facility...i know i...
1
by: wkerplunk | last post by:
Below is what I have build with several different languages. It works great but I need help, I am stuck. When you click on an item in the dropdown autocomplete div it does a mousedown function...
5
by: Doug | last post by:
Hi I have a simple form, just with one combo box and an OK button - and i have tried to use the autocomplete routine and I have enabled autocomplete in the combo box properties. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.