Introduction
I wanted a spell check that I could use in .NET, so like most people would have done, I Googled. After many hours of fruitless searching, I decided to make my own; sure there are plenty of spell checkers out there, but I didn't want one that relied on 3rd party components such as Word or require Internet connectivity to work. Introducing i00 .NET Spell Check, the first and only VB.NET Spell Check written completely in VB! Not only that, it is also open source, and easy to use.
Screen Shots
Spell check with definitions
In-menu word definitions and Change to...
Adding words to dictionary
Custom content menus
Crossword generator
Options
Owner draw and RTB support
Spell check dialog
Using the Code
To implement i00 .NET Spell Check into your project, first either:
- Reference the i00SpellCheck.exe file that is output from this project
- Add the
i00SpellCheck project to your solution and reference it
- or you can bring all of *.vb files in the "SpellCheck\Spell Check" folder (from the zip) directly into your own project
Next, simply place this at the very top of your form:
* the code below may change if you used option 3 to "Imports YourProject.i00SpellCheck"):
Imports SpellCheck.i00SpellCheck
Now you will be able to enable spell check. The above line will enable spell checking on all multiline textboxes on your form, and all owned forms that are opened.
Some other examples are below:
Me.EnableSpellCheck()
TextBox.SpellCheck()
Dim SpellCheckSettings As New i00SpellCheck.SpellCheckTextBox.SpellCheckSettings
SpellCheckSettings.DoSubforms = True SpellCheckSettings.AllowAdditions = True SpellCheckSettings.AllowIgnore = True SpellCheckSettings.AllowRemovals = True SpellCheckSettings.AllowInMenuDefs = True SpellCheckSettings.AllowChangeTo = True Me.EnableSpellCheck(SpellCheckSettings)
TextBox1.SpellCheck()
TextBox1.SpellCheck.Settings.AllowAdditions = True
TextBox1.SpellCheck.Settings.AllowIgnore = True
TextBox1.SpellCheck.Settings.AllowRemovals = True
TextBox1.SpellCheck.Settings.ShowMistakes = True
TextBox1.SpellCheck.ShowDialog()
Dim Dictionary = New i00SpellCheck.SpellCheckTextBox.Dictionary("c:\Custom.dic")
Dim Dictionary = New i00SpellCheck.SpellCheckTextBox.Dictionary("c:\Custom.dic", True)
Dictionary.Add("CustomWord1")
Dictionary.Add("CustomWord2")
Dictionary.Add("CustomWord3")
Dictionary.Save()
TextBox1.SpellCheck.CurrentDictionary = Dictionary
Using DictionaryEditor As New DictionaryEditor
TextBox1.SpellCheck.CurrentDictionary = _
DictionaryEditor.ShowDialog(RichTextBox1.SpellCheck.CurrentDictionary)
TextBox1.SpellCheck.InvalidateAllTextBoxesWithSameDict()
End Using
Even more examples are included in the Test project in the download.
Points of Interest
The words that get checked are added to a dictionary cache to speed up checking - the smaller cache is checked first. If the word is not found in the cache, then it checks the main dictionary.
I use fields (public variables) instead of properties for some basic classes, as they are about 2x faster than properties.
Downloads
Total Downloads: 
Downloads per day:

Change Log
20120203
- Tooltips now have image support and images for some definitions
- Fixed tool tip rendering issues
- You can now press F3 to change case of the selected text (requested by rykk)
- Made "-" be classified as a word break char
- Fixed an error that would re-paint the textbox errors 2x
- Disabled Cut/Copy/Paste options in menu if not on an STA thread as this would error
20120102 - Happy New Year!
- Modified definitions to lookup from file dynamically rather than being loaded into memory to reduce RAM usage ~56MB saved!
- Changed settings so that all the spellcheck settings are in a single class
- Cleaned up the
SpellCheckTextBox class and subclasses to make settings easily editable with a property grid
- Added property grid to the test project
- Added a dictionary editor
- Added a "bare-bones" test project to the solution, to make it simpler for users to see how easy it can be to use i00 .NET Spell Check in your projects!
- Changed the render method to eliminate redraw flicker, added a setting to revert to the old render method "
RenderCompatibility"
20111202 - Now with dialog!
- Cleaned up some stuff ... moved HTML formatted tooltip + HTML
ToolStripItem into their own controls
- Made the Text
ToolStripSeperator look and function better
- Made the right click menu items portable so that they can be added to any menu for other things - not so tightly bound to the text box
- Implementing a spell check dialog for F7 style spell checking (select text box and press F7!... can also be called with:
TextBoxName.SpellCheck.ShowDialog())
20111109 - In-menu definitions, synonyms and fixes!
- Changed tooltip definitions to match more words from their word base, e.g. "suggestions" matches "suggestion" for definition since no definition is matched explicitly for suggestions and states that it is plural in the tip
- Tooltip for definitions is now owner draw so that it appears a little nicer
- Fixed a case matching bug where "This" would suggest "this" rather than "This" (requested by TxDeadhead)
- Words like "Chris's" now suggest "Chris'" instead of "Chris's"
- Words that end in an ' no longer appear as being misspelled
- Made the context menu position itself a little better if near the bottom or right sides of a screen
- Fixed a bug where, if you press the context menu button on the keyboard multiple times, the menu would add multiple of the same corrections to the context menu
- Sped up loading of dictionary file
- Fixed a bug in the definition file - all adjectives and adverbs were mixed up (i.e., all adjectives were listed as adverbs, and all adverbs were listed as adjectives)!
- Various speed optimizations in finding word suggestions, to lookup misspelled word "suggestions" used to take ~250ms, now down to ~150ms
- Improved suggestion lookup now adds higher weight to words with extra duplicates or missing duplicates (such as "running", "running" > "running")
- Added in-context-menu definitions for correctly spelled words (requested by Dean)
- Words with interesting cases (such as SUpport, SupporT etc) now get picked up (requested by TxDeadhead)
- Now doesn't fall over if the dictionary, definitions or synonyms files have been removed - just removes functionality for that bit
- Added synonyms; "Change to..." menu item (requested by NtEditor)
20111106 - Been busy!
- Various speed optimizations
- Dictionary is now stored as a Flat File for portability
- Added owner draw support for spelling errors
- Added the ability to customize colors for highlighting misspelled words
- Added some examples of how to customize the appearance of the spell check
- Word definitions added for spelling suggestions ... so if you are unsure of the correct spelling out of the suggestions, you can pick the correct one from the definition
- The right click menu in .NET comes up from the middle of a text box when pressing the context menu button on the keyboard - It has now been modified to pop-out from the carets location
- Cross word generator - plan to make solver later too!
- Support added for Rich Text Boxes
- Added Suggestion Lookup Example
20111011 - Some fun extras
- Added anagram lookup
- Added Scrabble helper
20111008 - Minor changes
- Fixed a bug where the text box underlines would not always draw initially until the textbox was scrolled or had some text changed
- Cleaned up the interface to made it look more professional
20111006
Possible Issues
Since the Textbox has no way to really draw on it "nicely", I used to capture the WM_PAINT of the control and then draw on the textbox graphics that was set by going Graphics.FromHwnd... this seemed to work well but produced a slight flicker that I thought was undesirable...
As of version 20120102, the render method now uses layered windows (by default), this basically means that all of the underlines that appear to be drawn on the control are actually drawn on another window over the top of the control ...
So how does this affect the user? Well in most cases it doesn't, the form is click-through and only the drawings are visible not the form itself. In fact if you press start + tab in Windows Vista+, it even appears on the same window (as shown below)!
As I said above "in most cases"...
MIDI forms I haven't tested, but am quite sure that they won't work using the new render method.
Overlapping controls appear as follows:
And if the textbox is off the form it appears like:
So in cases such as the above, you will have to go back to the older "compatible" rending, this can be done in these cases by going:
TextBox.SpellCheck.Settings.RenderCompatibility = True
Thanks
Thanks for downloading.
Suggestions on possible improvements are much appreciated.