C# Tutorial 84: How to Create An AutoComplete TextBox In C#

  Рет қаралды 162,735

ProgrammingKnowledge

ProgrammingKnowledge

Күн бұрын

Пікірлер: 65
@thedude4039
@thedude4039 3 жыл бұрын
0:00 When I heard this first breath I knew this was gonna be a great video...
@ga7853
@ga7853 5 жыл бұрын
Thank you for explaining the difference between Suggest and SuggestAppend.
@obaialsamman8587
@obaialsamman8587 Жыл бұрын
Thank you so much 😊
@zainibosal2664
@zainibosal2664 3 жыл бұрын
Great Work sir
@looshy13
@looshy13 2 жыл бұрын
Thank you!
@fiverrdesigns3780
@fiverrdesigns3780 3 жыл бұрын
thank you
@carlosmartinez2514
@carlosmartinez2514 4 жыл бұрын
Thank you bro my respect for you
@AKLINA-m1o
@AKLINA-m1o Жыл бұрын
thanks!!
@stutitehri993
@stutitehri993 10 жыл бұрын
nice explanation on web service
@thiagozdzk2242
@thiagozdzk2242 3 жыл бұрын
Very good!
@carpal4489
@carpal4489 4 жыл бұрын
Thank you so much 💪😒❣️❣️
@jade01ist
@jade01ist 7 жыл бұрын
At last I found what I was looking for.
@samiihaq
@samiihaq 3 жыл бұрын
Is there a way to ask for users input and save in the listbox permanently?
@quanhoang2139
@quanhoang2139 10 жыл бұрын
thanks you so much
@juliancastelan9664
@juliancastelan9664 5 жыл бұрын
why does my source collection not allow me to paste multiple lines?
@micahparker5297
@micahparker5297 5 жыл бұрын
Because it wasn't designed for that... It can't comprehend it when you paste something. It is waiting for you to type, not paste.
@master765gt8
@master765gt8 7 жыл бұрын
Can you do it like you have the text box and if you press yes it will open up an different text box and if you press no it will open a different text box?
@micahparker5297
@micahparker5297 5 жыл бұрын
No.
@nahidmasudbro
@nahidmasudbro Жыл бұрын
I'm going to show the word that the letter I type is inside. example: where "c" exist in Ja"c"k, "C"haran, "C"haitrika, Bla"c"k. Sir how i make it.
@SHIDO_
@SHIDO_ Жыл бұрын
How make items in right no left
@jgavv5163
@jgavv5163 7 жыл бұрын
Hi do you have any tutorial how to serach word's in textbox nad display on textbox connected with database where you have a tabele coled vacobluary. In that tabele you have only Question_ID, Question_Name And Question_answer. So if you tape in textbox word will serach in tabele and populate the answer if it match with data? Thank you
@micahparker5297
@micahparker5297 5 жыл бұрын
No.. Sorry. BUT, I have a solution, here. www.codeproject.com/Articles/365974/Autocomplete-Menu An autocompletemenu, which can give you suggestions for completing text, just by making a String[] Array, right from the AutoCompleteMenu properties panel! More info is in the link.
@advaitkale1782
@advaitkale1782 5 жыл бұрын
Connect auto source to Database???
@andilesimelane4771
@andilesimelane4771 8 жыл бұрын
Hi thanks for this can we also do it in Java, using netbeans
@micahparker5297
@micahparker5297 5 жыл бұрын
Impossible. Sorry, @Andile Simelane
@LearnKinyarwanda
@LearnKinyarwanda 6 жыл бұрын
Hi! Kindly let me know how to use a textfile located somewhere in my computer's directory as an autocomplete source, instead of using a custom source!
@micahparker5297
@micahparker5297 5 жыл бұрын
That isn't possible, IMHO, because Microsoft hasn't 100% developed that yet. Regards
@pratikawate5826
@pratikawate5826 3 жыл бұрын
I am getting an "Invalid Cast Exception" I tried everything but none worked for me please help🙏
@prahaladkumar3802
@prahaladkumar3802 11 жыл бұрын
i like this video .
@rajanj8058
@rajanj8058 11 жыл бұрын
I am creating a spelling game and want to know how I can create a textbox (using C# or any other program) so that once a word is entered, it detects whether it is right or wrong and accordingly comes up with a correct or wrong message?? Any help would be appreciated!!!
@kipchickensout
@kipchickensout 5 жыл бұрын
Did you finish your game yet?
@H.B-Records
@H.B-Records 10 жыл бұрын
Thank you very much
@baalagee
@baalagee 9 жыл бұрын
May i know how to load current project directory in text box? can u explain sir?
@micahparker5297
@micahparker5297 5 жыл бұрын
- Won't work. Since VS(Visual Studio) is already using that folder/file, it will come across with an error-dialog: "An error has occurred! It seems the file you are accessing is being used by another process. Please shutdown the other process." Sorry, bud.
@muhammadafzal237
@muhammadafzal237 3 жыл бұрын
Sir how to create textbox auto complete from c# database data
@HeapKhim
@HeapKhim 4 жыл бұрын
Oh very good brother. I want to create dictionary so what can I do brother?
@mdmohiyuddinkhan
@mdmohiyuddinkhan 11 жыл бұрын
hi all, the autocomplete textbox is searching from starting, i want something like string search, example if i type a then it has to show all words which has a. The same like in phones now a days come for contact search. can any body helps me on this... it would be great help. I want this for C# windows application. for Web application through ajax tool kit it is already there. Thanks
@kentdmayor
@kentdmayor 7 жыл бұрын
Tried to to this but for some reason, it won't work even though I already followed the instructions correctly and carefully. Need help, please
@micahparker5297
@micahparker5297 5 жыл бұрын
Hmm, use this: www.codeproject.com/Articles/365974/Autocomplete-Menu
@MarioAxl
@MarioAxl 5 жыл бұрын
You should have framework 4.8 installed, Con el framework 4.8 aparecen más propiedades. para los que no encuentran el autocomplete.
@doge7831
@doge7831 3 жыл бұрын
It does not work with rich text boxes
@fadilibrahim
@fadilibrahim 2 жыл бұрын
👍👍
@tuanphamhoang87
@tuanphamhoang87 9 жыл бұрын
why can't textbox execute autocomplete when i choose multiline?
@micahparker5297
@micahparker5297 5 жыл бұрын
Because, the AutoComplete isn't meant for multiline. If it was, I'd bet that they would have added an AutoComplete for RichTextBox. Also, the maker of this video seems to be ignorant, so I will answer your questions. Regards
@TutorialsMethod
@TutorialsMethod 7 жыл бұрын
sir! i want to make auto complete like programming editor when we write our code any where it gives us suggestions ..can you help me please i am waiting for your response
@micahparker5297
@micahparker5297 5 жыл бұрын
That is a tall order - I suggest doing this: Make a syntax highlight. If they are inputting the right code, it will highlight the syntax in a color you want. If they aren't, you can totally highlight it in red or something. I don't have sample code, but search it in google and you're bound to find something that peaks your interest. Regards
@bmzih
@bmzih 5 жыл бұрын
@@micahparker5297 can you help me. I've got an assignment where I need to develop a simple IDE that supports C#. The problem is that they want where if you write a wrong code, it highlights it. Just the way you write a wrong code in Vb there is a red line that shows it has errors. If you have any suggestions it can help
@micahparker5297
@micahparker5297 5 жыл бұрын
@@bmzih Oh, I see what you want -- Luckily, this is really easy. So, you want to highlight it in Red? Sadly, you can't do red under-lining, but you CAN color the incorrect text. Here, use this: // getting keywords/functions string keywords = @"\b(abstract|as|base|break|case|catch|checked|continue|default|delegate|do|else|event|explicit|extern|false|finally|fixed|for|foreach|goto|if|implicit|in|interface|internal|is|lock|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|switch|this|throw|true|try|typeof|unchecked|unsafe|using|virtual|volatile|while)\b"; MatchCollection keywordMatches = Regex.Matches(codeRichTextBox.Text, keywords); // getting types/classes from the text string types = @"\b(Console)\b"; MatchCollection typeMatches = Regex.Matches(codeRichTextBox.Text, types); // getting comments (inline or multiline) string comments = @"(\/\/.+?$|\/\*.+?\*\/)"; MatchCollection commentMatches = Regex.Matches(codeRichTextBox.Text, comments, RegexOptions.Multiline); // getting strings string strings = "\".+?\""; MatchCollection stringMatches = Regex.Matches(codeRichTextBox.Text, strings); string stringz = "bool|byte|char|class|const|decimal|double|enum|float|int|long|sbyte|short|static|string|struct|uint|ulong|ushort|void"; MatchCollection stringzMatchez = Regex.Matches(codeRichTextBox.Text, stringz); // saving the original caret position + forecolor int originalIndex = codeRichTextBox.SelectionStart; int originalLength = codeRichTextBox.SelectionLength; Color originalColor = Color.Black; // MANDATORY - focuses a label before highlighting (avoids blinking) menuStrip1.Focus(); // removes any previous highlighting (so modified words won't remain highlighted) codeRichTextBox.SelectionStart = 0; codeRichTextBox.SelectionLength = codeRichTextBox.Text.Length; codeRichTextBox.SelectionColor = originalColor; // scanning... foreach (Match m in keywordMatches) { codeRichTextBox.SelectionStart = m.Index; codeRichTextBox.SelectionLength = m.Length; codeRichTextBox.SelectionColor = Color.Blue; } foreach (Match m in typeMatches) { codeRichTextBox.SelectionStart = m.Index; codeRichTextBox.SelectionLength = m.Length; codeRichTextBox.SelectionColor = Color.DarkCyan; } foreach (Match m in commentMatches) { codeRichTextBox.SelectionStart = m.Index; codeRichTextBox.SelectionLength = m.Length; codeRichTextBox.SelectionColor = Color.Green; } foreach (Match m in stringMatches) { codeRichTextBox.SelectionStart = m.Index; codeRichTextBox.SelectionLength = m.Length; codeRichTextBox.SelectionColor = Color.Brown; } foreach (Match m in stringzMatchez) { codeRichTextBox.SelectionStart = m.Index; codeRichTextBox.SelectionLength = m.Length; codeRichTextBox.SelectionColor = Color.Purple; } // restoring the original colors, for further writing codeRichTextBox.SelectionStart = originalIndex; codeRichTextBox.SelectionLength = originalLength; codeRichTextBox.SelectionColor = originalColor; // giving back the focus codeRichTextBox.Focus(); - Is this what you needed? Put it into the TextChanged event of a RICHTEXTBOX. Don't do textbox, they don't have certain requirements for it. This happily creates a Syntax-Check, without needing to install a Nu-get package. If you need C# Syntax, then use this. I inputted all C#-Keywords in correct coloring(From the Microsoft Site.), so you will maybe only need to double-check it once. So, in summary, this code will highlight any C#-Code the user inputs into the RichTextBox. I made it color it BLUE, but, you can change any of them, if you want to. Basically, if the user inputs Non-C# Code, then it will NOT be highlighted in blue(or whatever color.) Instead, it will just be regular text. If you want something more, ask me! If you need help with anything else, I am always here to help. Thank you for asking, @Ned Regards, Micah
@khalidpierre4336
@khalidpierre4336 7 жыл бұрын
Can you give us the source code
@bothannwinn870
@bothannwinn870 7 жыл бұрын
my android studio doesn't contain Design mode? Why?
@doieslovebot9289
@doieslovebot9289 6 жыл бұрын
Hello, is there any way to use autocomplete with multiple words inside the textbox?
@micahparker5297
@micahparker5297 5 жыл бұрын
You'd have to re-code the textbox to do that. Sorry. Regards
@micahparker5297
@micahparker5297 5 жыл бұрын
@@mondron Actually, my first comment was incorrect. A good AutoCompletion is here: www.codeproject.com/Articles/365974/Autocomplete-Menu It is compatible with both RichTextBox & TextBox Controls. I hope I helped you :)
@rawaise
@rawaise 11 жыл бұрын
nice
@noijze
@noijze 6 жыл бұрын
saus raw saus
@RAIRAIIRAI
@RAIRAIIRAI 6 жыл бұрын
lmao exactly what i was thinking
@EugenDET
@EugenDET 5 жыл бұрын
Was für eine Scheiße...
@kipchickensout
@kipchickensout 5 жыл бұрын
Lol
@sanjayajanakantha7883
@sanjayajanakantha7883 2 жыл бұрын
thank you
@theyuriharrison
@theyuriharrison 11 жыл бұрын
nice
C# Tutorial 85: Textbox autocomplete with Database Values
18:05
ProgrammingKnowledge
Рет қаралды 129 М.
Autocomplete TextBox in Asp .Net C# with SQL | Autocomplete Textbox
14:26
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 30 МЛН
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 3,3 МЛН
C# Tutorial 90: How to Display Google Maps in C# Windows Form
13:05
ProgrammingKnowledge
Рет қаралды 201 М.
C# Autocomplete textbox from mysql database
7:55
Programming for Everybody
Рет қаралды 1,3 М.
C# Tutorial 19:   Message Box Asking if The User Wants To Exit
6:19
ProgrammingKnowledge
Рет қаралды 153 М.
How to Create jQuery AutoComplete Textbox in ASP.Net C# 4.6 with database
15:52
Haritha Computers & Technology
Рет қаралды 25 М.
C# WPF AUTO COMPLETE TEXT BOX
5:18
SAEEDI SOFT
Рет қаралды 10 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 1 МЛН
C# Tutorial 88: How to Search Listbox and get all matches using C#
17:10
ProgrammingKnowledge
Рет қаралды 69 М.
The Value of Source Code
17:46
Philomatics
Рет қаралды 198 М.