Make a spell checker - vb.net

I am a newbie to VB.Net. Before, I did programming in PHP. I made a spell checker in PHP which splitted a big string into single word by spaces, checked if the word is there in the dictionary, if not, it highlighted it and gave some suggestions when a user clicks on it. I want to make the same thing in VB.Net... Any ideas??
Thanks.

make use of a Dictionnary(Of String, String) for your dictionnary. ;
To split the string, you have the Split function (" ,;.") ;
define ExtWord, a class holding the word, a boolean stating if in or not the dictionnary,
and the proposed corrections.
Then you have a list of ExtWord that you bind to a ListView, the
listview having a Horizontal WrapPanel as ItemsPanel.
Set the background color of TextBlock depending if inside the Dictionnary or not .
Then handle the right click on a TextBlock, and can build a ContextMenu in code and add the correct words inside it in code, then show it.
Only problem i see is how to do the 'carriage return' with
the WrapPanel.
Hopes it helps to get to your solution.

Try below link for spell checker in vb.net
http://www.a1vbcode.com/app-3641.asp
http://www.codeproject.com/Articles/265823/i00-VB-NET-Spell-Check-No-3rd-Party-Components-Req

Related

How to use custom code to add Excel-like "color scale" conditional formatting to SSRS report

I am trying to use this custom code in SSRS
public function ColorScaleRYG(value, minValue, maxValue) as string
in a custom code in ssrs
and then in a Fill expression
=Code.ColorScaleRYG(Sum(Fields!SalesAmount.Value), 0, 100000)
which should break my values in a group and assign shades of colors from red(0) to green(max valer).
But for some reason nothing happens/
What am I missing?
I need something like that:
I wont be able to give you the specific answer as it is with your code, however this is how I go about it.
In Design Mode I Right click the required Cell and Select "Text Box Properties.
I then go to the Fill Tab and click on the expression button next to Fill Color.
I then User something like the following code
=IIF(Fields!Total_Eligible.Value>100,"MidnightBlue","Silver")
You should be able to Stack this IIF Commands.
It is just a matter of changing the Fields! field to the approriate variable and then the conditions.
This Returns the following Values
Hope this Helps.
Post Note - Probably dont use these colors as they aren't easy to read , I just grabbed two at random off an existing report to demonstrate.

How can i set an Horizontal scroll or multiline text on a Combobox ? ( Vb.net)

I ' ve a combobox with too long multiple Items . There is any method to set a horizontal scroll in combobox or set a multiline properties for each item ?
Hi Mattia,
There are a couple of methods that are usable as well as effective for this problem you are having, here is the concept that I've created that you may implement in your project;
Original text: C:\path1\path2\path3\path4\file.exe
Combo Box text: C:\path1\p...file.txt
To do this you will 1st have to specify how many characters you want to shown in the start of the text (1st 5 or so) then you must specify how much you would like to leave off at the end (last 6 or so).
I realize this causes a problem, "I wont be able to see the full path!", however adding a 2nd form or a msgbox to display the full text which should initiate the 1st 2-4 secs of display time, this should not be a challenge nor a problem and will make you look like a Pro!
I hope this helped you with your problem or motivated you to go over and beyond!

How to make a part of a label bold

I want to make bold just the "name" in the string, how to do it?
Dim name As String = Environment.UserName
LabelWelcome.Text = "Welcome " + name + ", ...!"
I don't believe this is do-able on default labels since there is no style formatting.
I suggest to use 2 labels or a rich text box control.
You can use two labels and put them side by side. One having the bold part and other having the simple text.
You can use the OnPaint() method for custom drawing also
I found this : http://pastebin.com/L4xScMjZ [Not made by me]
It's a class that highlights part of a label for you. It doesn't bold it, but you can highlight the important part in red or any color you want.
I'm sure you could turn this to make the highlighted part bold as well.
To use it, you create a new class and put that code in.
Build your project and there should be a new control called "Scrolling Label"
You can add that control to your project and edit the properties :
Highlight : # --> how many characters you want it to highlight from left to right
HighLightText --> The color of the highlighted text
This is a bit buggy so you might want to add "DoubleBuffer = True" in your form Load
For those who still Google this: You can make a function which replaces your characters with some unicodes. You can use most of WorksheetFunction.Unichar(119808) to WorksheetFunction.Unichar(120831)

VBNet Textbox AutoComplete

i was wondering how some programmers made autocomplete functionality such that it also matches character within the string.
Like for example, there are current records in the table of the database and these are:
Ants
Apes
Bats
Bees
Cats
Dogs
Elephants
When I start typing letter "E" in the textbox, i want that the autocomplete functionality suggest these records:
Apes
Bees
Elephants
since all these string contains letter "E"
hope you can help me with this one. thanks :)
The native controls will not work that way (as far I've I can tell); when you use the auto-complete features, it starts populating the list with matching the start of the word.
You'll have to extend the functionality for auto-complete by implementing custom logic to perform substring searches to populate the match list. There is a promising question and answer on SO for this already.
insert combobox
insert items into combobox
set dropdownstyle to simple
set autocompletemode to suggestandappend
set autocompletesource to listitems

Text input issues with Visual Basic

Ok, I'm writing a program in vb. It's simply a text editor. However i've run into a little snag. My program has options to click a button and text is inserted into the text box. I am using this line:
textbox.AppendText (sometext)
Now this code works great if i want the text to be added at the bottom of the page. So here's my question, is there any way to modify or maybe replace this code so that the text is inserted were the cursor is?
Try setting .SelectedText property or using .Paste(String).
Not through the textbox control itself, as far as I know. You will need to use the SelectionStart property to manually insert the text.
textBox1.Text = textBox1.Text.Substring(0, textBox1.SelectionStart) & "INSERTEDTEXT" & textBox1.Text.Substring(textBox1.SelectionStart)
This is assuming you want to insert the text and not just replace it.