473,241 Members | 1,596 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,241 software developers and data experts.

Textbox auto-complete feature

Hi,

I am developing an application using VB.Net and hope that the textbox can
process features which are similar to auto-complete features in Window. For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John
Nov 21 '05 #1
8 30377
John,

If you mean in a windows form and a historical set of words used in your
program, than it will be in my opinion the most easy using the regisistry
and the keyUp event from the textbox.

If it is a set of words general used in your organisation than you will have
to read it first from a database or have it fixed as words in your program.

Just as idea

Cor

"John" <Jo**@discussions.microsoft.com> schreef in bericht
news:A4**********************************@microsof t.com...
Hi,

I am developing an application using VB.Net and hope that the textbox
can
process features which are similar to auto-complete features in Window.
For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John

Nov 21 '05 #2
Hi,

In addition to Cor's comments vb.net 2005 has an autocomplete
feature.

http://msdn2.microsoft.com/en-us/library/chff42zw

http://msdn2.microsoft.com/en-us/library/aehe18z8

Ken
---------------------
"John" <Jo**@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
Hi,

I am developing an application using VB.Net and hope that the textbox
can
process features which are similar to auto-complete features in Window.
For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John

Nov 21 '05 #3
If you're interested in a commercial solution contact me offline.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"John" <Jo**@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
Hi,

I am developing an application using VB.Net and hope that the textbox
can
process features which are similar to auto-complete features in Window.
For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John

Nov 21 '05 #4
Dear Ken,

Thanks. But I am currently using 2003 and not yet ready to migrate to
2005.

Thanks for your information.

Rgs,
John

"Ken Tucker [MVP]" wrote:
Hi,

In addition to Cor's comments vb.net 2005 has an autocomplete
feature.

http://msdn2.microsoft.com/en-us/library/chff42zw

http://msdn2.microsoft.com/en-us/library/aehe18z8

Ken
---------------------
"John" <Jo**@discussions.microsoft.com> wrote in message
news:A4**********************************@microsof t.com...
Hi,

I am developing an application using VB.Net and hope that the textbox
can
process features which are similar to auto-complete features in Window.
For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John


Nov 21 '05 #5
Dear Cor,

Thanks for your idea. But I need a bit more details. According to your
reply, I will retrieve the "values" from database during the FormLoad events.
Then when user types in the text box, I will place code in the KeyUp event
to pick up values according to user's types in. But what to do to display
the value? There are two approaches for me to consider but I have problem to
achieve it.

1.) Display a list of values for user to select. The interface will look
like displaying a Context Menu but Context menu requires a mouse pointing to
that field and then Right Click the field. However, in my case, there will
not be any mouse over event as well as right lick events. There are only a
series of keypress or keyup events. Is there any Controls and Events which
can achieve this things?

2.) Display a value for user to complete the field. It is exactly the
case that when you are typing "Sat" in MS Word, Word will display "Saturday"
in a tool tip text box nearby where you type. If that is what user wants to
type, user just press <Enter> to get the value. But What Events and Controls
in VB.Net is required to achieve this effect? I have tried ToolTip controls
but this control requires Mouse Over events.

Thanks for your suggestion

Rgs,
John

"Cor Ligthert [MVP]" wrote:
John,

If you mean in a windows form and a historical set of words used in your
program, than it will be in my opinion the most easy using the regisistry
and the keyUp event from the textbox.

If it is a set of words general used in your organisation than you will have
to read it first from a database or have it fixed as words in your program.

Just as idea

Cor

"John" <Jo**@discussions.microsoft.com> schreef in bericht
news:A4**********************************@microsof t.com...
Hi,

I am developing an application using VB.Net and hope that the textbox
can
process features which are similar to auto-complete features in Window.
For
example, when user types "ap" in a textbox and the data associated to the
textbox contains ("apple", "applet", "application"......), the application
will suggest "apple" to the user to select and user can either select the
suggestion or continue to type another word he disires.

How to achieve this features?

Thanks for your help and attention.

Rgs,
John


Nov 21 '05 #6
John,

You make it yourself very difficult by using a textbox. The combobox and
listbox have both a findstring method. That is especially for this kind of
operations. I have made myself a combobox autocomplete sample, however that
is for a very special one. If you search Google for combobox autocomplete
you find tons of those.

http://groups.google.com/group/micro...1d7cb3c?hl=en&

In the way you want it with a textbox, you will need to find that string
everytime, for what I will think that only a datatable.select will fit

http://msdn.microsoft.com/library/de...electtopic.asp

I hope this helps something.

Cor
Nov 21 '05 #7
Dear Cor,

Thanks for your reply and sorry for my late reply because I have to
investigate some API of Fax Automation for the system as well. I hope you
can notice this mail and give me some idea.

I have just retried the ComboBox as you have told me about and I know
that Combo is close to what I need because it can type in value and choose
value. Unfortunately, I cannot make what my Mgr wants exactly. So, let me
explain in details. Maybe you have work-around method on Combo Box that can
achieve my Mgr requirement.

In the application, there are some free format fields like job title of
our customer. I cannot predefine these fields because they vary much.
However, my Mgr hopes that I can create a field (not a must to be a textbox)
that can achieve the following 2 cases.

1) when user has to type in a value that exists before, the field can auto
fill / suggest the value. For example, the database contains "Analyst
Programmer" and user has typed "analyst programmer", the application will
automatically fill / suggest "Analyst Programmer". This feature helps to
reduce typing mistake.

2) when user has to type in a value that is not exists before but similar,
the system will suggest / fill the value but user can override with his
actual value. For example, the database has "assistant manager" but the user
wants to enter "Assistant Supervisor".

Thanks for your help so far and I hope the above description let you
understand more on my situation and you can suggest some good ideas for me.

Thank you very much.

Rgs,
John

"Cor Ligthert [MVP]" wrote:
John,

You make it yourself very difficult by using a textbox. The combobox and
listbox have both a findstring method. That is especially for this kind of
operations. I have made myself a combobox autocomplete sample, however that
is for a very special one. If you search Google for combobox autocomplete
you find tons of those.

http://groups.google.com/group/micro...1d7cb3c?hl=en&

In the way you want it with a textbox, you will need to find that string
everytime, for what I will think that only a datatable.select will fit

http://msdn.microsoft.com/library/de...electtopic.asp

I hope this helps something.

Cor

Nov 21 '05 #8
John,

This is in my idea recognizing a word and than get the most possible
equivalent. In my opinion is this more a natural language problem than a
program language problem. To find the equivalents in a table when you know
those (even with wildcards) is probably as well for you no problem. However
creating that table, that will be the problem especially for most developers
which are not always the best in natural languages.

Maybe can *speech* help you (I have no experience with that), otherwise I
would tell to your manager something the same as I wrote above and ask him
if he is able to create that table for you.

I hope this helps.

Cor
Nov 21 '05 #9

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

Similar topics

2
by: dskillingstad | last post by:
I'm trying to assign a custom value to a textbox. Here's what I have. I've created a module and "default value" code for a textbox which generates a custom auto-number (yyyy-0000) when a New...
0
by: Alex Moskalyuk | last post by:
I am using System.Windows.Forms.TextBox to publish some real-time data that's coming off the external devices. My data is fed into the TextBox with proper precautions not to exceed the MaxSize...
5
by: Wilfried Mestdagh | last post by:
Hello, textBox += someData + "\r\n"; does not scroll the visible text to the end. How do I perform that ? Also this way seems to me a lot of reallocating memory. Is there better way to add...
4
by: Grant Schenck | last post by:
I want to append text to the end of a text box. If the cursor is currently at the end I just want to append it and have the normal scrolling take place if needed. However, if the selection...
4
by: MUSTAFA IRSHAD | last post by:
DEAR SIRS, I AM DEVELOPING A SOFTWARE BY USING VB.NET AND SQLSERVER 2000 FOR A NETWORK ENVIRONMENT. I HAVE A BROBLEM THAT I HAVE A FIELD FOR PRIMERY KEY WHICH IS AUTO GENERATED. I NEED THAT WHEN...
0
by: 23s | last post by:
Is there any way I can send a vertical value to a form's scroll position? I have a full-screen form that, at launch, contains an empty tab sheet. At run time, the user can dynamically append a...
1
by: santosh2003 | last post by:
Hi All, How can we make autoscroll text in multiline textbox in asp.net? I have one textbox in home page i want to make the text in textbox auto scroll after load the page. Pls suggest how...
7
wassup
by: wassup | last post by:
Hi all, I need a help again. How to set the textbox auto change to Upper Case without on the Caps Lock Key.
9
by: Mark G. | last post by:
Good afternoon. I have a "Fixed/2" format applied to a textbox on its property sheet. When I type data in the textbox, it is formatted correctly. But when I update the value programatically by...
1
by: kamalhasnainee | last post by:
I have solved my previous Problem.............. Now I have a new problem.. please see below... TextBox Auto update I have two table like "Employees" Table Fields:
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.