# VBForums CodeBank > CodeBank - Visual Basic .NET >  20130521 - i00 Spell Check and Control Extensions -No Third Party Components Required

## i00

*Code Project Prize winner in Competition "Best VB.NET article of October 2011"*

*Download*
*Anyone wishing to use this code in their projects may do so, however are required to leave a post on this thread stating that they are using this.
A simple "I am using i00 Spell check in my project" will suffice.*

*DO NOT MIRROR*
*DO NOT LINK DIRECTLY TO THIS FILE - LINK TO THIS POST INSTEAD*
*DO NOT RE-DISTRIBUTE THIS SOURCE CODE PARTLY OR IN ITS ENTIRETY*

Latest Version now hosted on Code Project:

*Go here to download!*

Total Downloads: 

Downloads per day:


*About*

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*.

Eventually, this project progressed even further into a generic control extension plugin that provides plugins for text box printing, translation, speech recognition and dictation plus more; while also providing a simple method for users to write their own extensions. 

*Donations*
rykk - $30
Member 2262881 (POSabilities Inc.) - $100

*Donate Here* - and be sure to put "i00 Spell Check", your user name (or other alias), and if you want the amount disclosed in the description field  :Smilie: 

*Users*
Users have been moved to their own post since the post size had been reached

Click here for users

*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*


*Support for DataGridViews!*


*Plugin support ... with label plugin*


*Plugin support ... with FastColoredTextBox plugin*

*Implementation*
To implement i00 .Net Spell Check into your project first either:
add the i00SpellCheck project to your solution and reference it (recommended)reference the i00SpellCheck.exe file that is output from this project*or you can bring all of *.vb files in the "SpellCheck\Spell Check" folder (from the zip) directly into your own project*
*NOTE:* For the methods with the * you will need to also copy the dictionary files to the applications path

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")

vb Code:
Imports i00SpellCheck

Now you will be able to enable spell checking by placing the following in your form load event:

vb Code:
Me.EnableControlExtensions()
*The above line will enable control extensions on all controls that are supported on the form, and all owned forms that are opened.*

Other examples are below:

vb Code:
'To load a single control extension on a control call: ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter) 'To enable spell check on single line textboxes you will need to call:TextBox1.EnableSpellCheck() 'If you wanted to pass in options you can do so by handling the ControlExtensionAdding event PRIOR to calling EnableControlExtensions:AddHandler ControlExtensions.ControlExtensionAdding, AddressOf ControlExtensionAdding'Also refer to the commented ControlExtensionAdding Sub in this form for more info 'You can also enable spell checking on an individual Control (if supported):TextBox1.EnableSpellCheck() 'To disable the spell check on a Control:TextBox1.DisableSpellCheck() 'To see if the spell check is enabled on a Control:Dim SpellCheckEnabled = TextBox1.IsSpellCheckEnabled()'To see if another control extension is loaded (in this case call see if the TextBoxPrinter Extension is loaded on TextBox1):Dim PrinterExtLoaded = TextBox1.ExtensionCast(Of TextBoxPrinter.TextBoxPrinter)() IsNot Nothing 'To change spelling options on an individual Control:TextBox1.SpellCheck.Settings.AllowAdditions = TrueTextBox1.SpellCheck.Settings.AllowIgnore = TrueTextBox1.SpellCheck.Settings.AllowRemovals = TrueTextBox1.SpellCheck.Settings.ShowMistakes = True'etc 'To set control extension options / call methods from control extensions (in this case call Print() from TextBox1):Dim PrinterExt = TextBox1.ExtensionCast(Of TextBoxPrinter.TextBoxPrinter)()PrinterExt.Print() 'To show a spellcheck dialog for an individual Control:Dim iSpellCheckDialog = TryCast(TextBox1.SpellCheck, i00SpellCheck.SpellCheckControlBase.iSpellCheckDialog)If iSpellCheckDialog IsNot Nothing Then    iSpellCheckDialog.ShowDialog()End If 'To load a custom dictionary from a saved file:Dim Dictionary = New i00SpellCheck.FlatFileDictionary("c:\Custom.dic") 'To create a new blank dictionary and save it as a fileDim Dictionary = New i00SpellCheck.FlatFileDictionary("c:\Custom.dic", True)Dictionary.Add("CustomWord1")Dictionary.Add("CustomWord2")Dictionary.Add("CustomWord3")Dictionary.Save() 'To Load a custom dictionary for an individual Control:TextBox1.SpellCheck.CurrentDictionary = Dictionary 'To Open the dictionary editor for a dictionary associated with a Control:'NOTE: this should only be done after the dictionary has loaded (Control.SpellCheck.CurrentDictionary.Loading = False)TextBox1.SpellCheck.CurrentDictionary.ShowUIEditor() 'Repaint all of the controls that use the same dictionary...TextBox1.SpellCheck.InvalidateAllControlsWithSameDict()    ''This is used to setup spell check settings when the spell check extension is loaded:Private Sub ControlExtensionAdding(ByVal sender As Object, ByVal e As ControlExtensionAddingEventArgs)    Dim SpellCheckControlBase = TryCast(e.Extension, SpellCheckControlBase)    If SpellCheckControlBase IsNot Nothing Then        Static SpellCheckSettings As i00SpellCheck.SpellCheckSettings 'Static for settings to be shared amongst all controls, use dim for control specific settings...        If SpellCheckSettings Is Nothing Then            SpellCheckSettings = New i00SpellCheck.SpellCheckSettings            SpellCheckSettings.AllowAdditions = True 'Specifies if you want to allow the user to add words to the dictionary            SpellCheckSettings.AllowIgnore = True 'Specifies if you want to allow the user ignore words            SpellCheckSettings.AllowRemovals = True 'Specifies if you want to allow users to delete words from the dictionary            SpellCheckSettings.AllowInMenuDefs = True 'Specifies if the in menu definitions should be shown for correctly spelled words            SpellCheckSettings.AllowChangeTo = True 'Specifies if "Change to..." (to change to a synonym) should be shown in the menu for correctly spelled words        End If        SpellCheckControlBase.Settings = SpellCheckSettings    End IfEnd Sub

Even more examples are included in the Test projects included in the download  :Smilie: .

*Plugins*
Since version 20120618 i00SpellCheck has plugin support.

Plugins in i00SpellCheck allow components to be spell checked by making a dll or exe file that contains a public class that inherits i00SpellCheck.SpellCheckControlBase.

They automatically get picked up and allow the spellchecking of extra controls, with no reference to the file itself required. However you will need to place them in the applications path.

The use of plugins allow users to enable spellchecking of their controls, without having to change the i00SpellCheck project.

Another use for them could be to allow the programmer to quickly see if they have spelling errors on forms etc. For example placing the LabelPlugin.exe file in an application path (that already uses i00SpellCheck) will cause all labels in the existing project to be spell checked ... with NO code changes! When the developer wants to deploy their application they simply need to remove the LabelPlugin.exe file, and labels will no longer be corrected.

The basic procedures for creating a plugin are as follows:

Start by creating a new project (class library or exe)Reference i00SpellCheckMake a class that inherits i00SpellCheck.SpellCheckControlBaseOverride the ControlType Property to return the type of control that you want your plugin to spell checkAdd your code

For examples on inheriting i00SpellCheck.SpellCheckControlBase check out the examples in the Plugins path in the download.

*Version Changes*
Version changes have been moved to their own post since the post size had been reached

Click here for version changes

*Possible Issues*
*SpellCheckTextBox*
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/7 it even appears on the same window!

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 the corrections appear to "Float" outside the form.

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:
DirectCast(TextBox.SpellCheck, SpellCheckTextBox).RenderCompatibility = True
*Thanks*
A special thanks to Pavel Torgashov for his excellent FastColoredTextBox control. This control is used in the solution to test i00SpellCheck's plugin architecture with 3rd party controls. i00 has not modified this control in any way and is only responsible for integrating the spell checking ability to it via an i00SpellCheck plugin. In no way is this control required for spell checking functions in other projects within the solution.

Thanks for downloading... *Also please provide feedback, rate this thread and say thanks if this helped you*

Suggestions on possible improvements are much appreciated

Also I extend a special thanks to the users who thanked / rated this post.

Thanks again
Kris

----------


## moti barski

something is missing from the walkthrough :
this line : Imports SpellCheck.i00SpellCheck
it means some files are needed to be added to the solution explorer or some dll reference ?
could you please complete the walkthrough

----------


## i00

NOTE: I have put this in it's own post as i have run out of room in the main one (has a char limit)

*Version Changes*

Next Version
Nothing yet... check back later...

Hopefully ...
Make F7 just check the selected text?Make F7 dialog work for DGV's

*20130521*
i00SpellCheck
*Fixed bug that would occur when multiple textboxbases shared a context menu* (found by Adviser)*DataGridView CellStyle no longer has to be set to WrapMode.True for corrections to appear in the DataGridView*Fixed a possible rendering issue where the error underlines would not be drawn in some instancesFixed a possible bug where, on some rare occasions, the spell check dialog would error upon opening (found by  TheComputerMan08 (Brent))*Fixed an issue where words starting with a capital were not getting picked up by the spell check*Fixed a bug where if selecting a new dictionary with the default ShowUIEditor function the control would not clear old correct words from cache*Now automatically spell checks controls in SplitContainers*
FastColoredTextBoxPlugin
*Added HTML example to FCTB with html color highlighting*Updated FCTB to latest versionFixed an issue with FCTB where when inserting text all of the text would be spellchecked instead of just the visible range, speeding up large copy and pastes
HanksDictionaryTest
*Added another example of using a different dictionary with i00 Spell Check ... Hanks Dictionary* (by tewuapple (Hank))
WordDictionaryTest
*Added another example of using a different dictionary with i00 Spell Check ... Word Dictionary*

*20130114*
i00SpellCheck
*Added engine to make more generic control extensions*Changed the workings of SpellCheckControlBase to use the more generic control extensionsDefault dictionary load is now threadded even when just calling .SpellCheckControl extensions can now specify multiple ControlTypesPut the TextBoxBase change case feature into its own control extensionPut the nicer TextBoxBase context menu into its own control extensionMade the window animations smoother and more stable for F7 etcControl extensions can now be dependant on other control extensions (like references but within control extensions)
TextBoxPrinter
*Added TextBoxPrinter plugin*
TextBoxSpeechRecognition
Added buttons to trigger dictate and speechCustom Karaoke rendering control added to test formNow uses the new, more generic, control extension rather than extending SpellCheckTextBoxSpeech is no longer "broken up" at the end of each line in Windows 8
OSControlRenderer
*Added OSControlRenderer plugin*
SelectedControlHighlight
*Added SelectedControlHighlight plugin*
TextBoxTranslator
*Added TextBoxTranslator plugin*
Test
Neatened up Draft Plan rendering

*20121102*
i00SpellCheck
Made SpellCheckDialog more universal (so it can be used with other controls more easily)Fixed a bug when using the SpellCheckDialog to spell check where the textbox would flicker and repaint several times upon confirming the changesAdded IgnoreWordsInUpperCase setting (requested by TheMperor)Added IgnoreWordsWithNumbers setting (requested by TheMperor)Fixed a bug that would cause the balloon tooltip to stuffup if it was on a screen to the left of the primary screen, this could cause the spell check dialog to crash
Test
Added some options to the Performance Monitor windowOpenOfficeHunspellDictionaryHunspell now has case error underlineingAdded Hunspell syninoum lookup to Hunspell test project
TextBoxSpeechRecognition
*Tray icon appears when using speech**Added a karaoke style content menu item when speaking*Now when triggering speek or dictate all instances of speech (across all applications that use i00 spell check) are terminated so that you can't get "multiple people" talking at once
*20120920*
Added performance counterFixed a bug with the built in dictionary where the dictionary index would be filled up with user words and potentially cause errors, this also has speed up spellchecking a lotFixed an issue with the spell check dialog, if you had alot of data it would "freeze"

*20120914*
Added Redo to context menu for rich text boxesChanged the way the items are added to the spell check text box content menus to make them more expandable*TextBoxSpeechRecognition now adds menu items to TextBoxBase context menus*Added properties to TextBoxSpeechRecognition to adjust various settingsFixed a bug that would cause an error when getting sugguestions for a word, where no suggestions could be made

*20120907*
Removed some redundant stuff from the project*Added a button to the test form that brings up the dictionary editor*Changed the way the flat files dictionary index is storedChanged the way the flat files dictionary is stored in memory*Changed the dictionary alot to allow for easy user dictionary creation for inherreted dictionary classes*Changed the way the dictionary is indexed*Added a C# test project**Added a test project to demonstrate how people can use other spelling engines in i00 Spell Check.  Hunspell in this case which has support for open office dictionaries*

*20120903*
Added SpellCheckControlAdding event that allows you to pass back e.Cancel = True to prevent the control from being checkedFixed a bug that could produce an error if you call .EnableSpellCheck multiple times on several forms (found by rfreedlund)*Indexed dictionary - added slightly to the initial loading time... but sped up checking significantly* (requested by Maverickz)Fixed a rare occuring bug where an error would be thrown with the spellcheck cache*User dictionary file is now separate from the built in dictionary* Ignored words are now stored in the user dictionaryUpdated the FlatFile dictionary editor to support the new user dictionaryAdded i00Binding List to the project for the FlatFile Dictionary editor... you can remove the reference, if you want, but will first have to remove the dictionary editor if you don't require it (found in i00SpellCheck\Spell Check\Engine\Dictionary\Flat File\Editor)Changed the dictionary dramatically to support custom classes to enable the checking of other dictionary formats*Added a plugin that extends the SpellCheckTextbox, adding voice recognition to it! However Microsoft's inbuilt speech recognition isn't great.  Press F12 twice quickly to perform speech recognition*Made built in plugins more extendable

*20120625*
Changed the way the words get added to the dictionary cache (increased spell checking speed)Improved the speed of the FastColoredTextBox PluginMade the test project automatically pickup any plugins in the project path and add them to tabs automatically - the references to the plugins are not required, they were added for the LabelPlugin and FastColoredTextBoxPlugin so that they automatically get placed in the same folder when the project is built!

*20120622 - FastColoredTextBox*
Changed some internal workings of the spell checker*Added support for FastColoredTextBox with included plugin!*

*20120618 - Plugins!*
*Added test plugin to project that grants the ability to spell check labels**Changed the structure / inner workings of the spell check alot / made the spell check more modular and plugins possible!*Fixed a bug where the settings were not being applied under certain circumstances to spell check controls*Grid view spell checking now is shown on cells even when their not being edited*

*20120609 - DataGridView's are go!*
*Added support for DataGridViews* (requested by in2tech)Fixed a bug where the underlines would not draw in the correct positions when word wrapping is disabledFixed a bug where single line TextBoxes would not always show spelling errors

*20120608 - Disabling and bug fixes*
Fixed a bug where if you had an apostrophe at the start of a word it would push the underline spacing out (found by jwinney)*Added ability to disable the spell check on a TextBox* (requested by Gabriel X)Fixed a bug where the standard TextBox was not refreshing properly since the new rendering method was addedFixed bug where if a TextBox contained errors and all text was deleted the underlines would still show (found by jim400)Some minor interface changes with splash screen and "alt" for menuFixed up an issue where if you put a tab in a TextBox it would treat the tab as a word character (found by Santa's Little Helper)

*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 charFixed an error that would re-paint the textbox errors 2xDisabled 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 classCleaned 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 formated tooltip + HTML ToolStripItem into their own controlsMade the Text ToolStripSeperator look and function betterMade 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*Implemented 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 eg "suggestions" matches "suggestion" for definition since no definition is matched explicitly for suggestions and states that it is plural in the tipTooltip for definitions is now owner draw so that it appears a little nicerFixed a case matching bug where "Tihs" would suggest "this" rather than "This" (found by TxDeadhead)Words like "Chirs's" now suggest "Chris'" instead of "Chris's"Words that end in an ' no longer appear as being misspelledMade the context menu position itself a little better if near the bottom or right sides of a screenFixed 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 menuSped up loading of dictionary fileFixed a bug in the definition file - all adjectives and adverbs were mixed up (ie all adjectives were listed as adverbs, and all adverbs were listed as adjectives)!Various speed optimizations in finding word suggestions, to lookup misspelled word "sugguestions" used to take ~250ms, now down to ~150msImproved suggestion lookup now adds higher weight to words with extra duplicates or missing duplicates (such as "runing", "runnning" > "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 optimizationsDictionary 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 - Initial Release*

----------


## kareninstructor

Regarding the import statement, once you have added any DLL to the project references then check the reference under Imported References (on the Reference tab) you may not need the import statement unless there is a clash with another DLL's namespace.

----------


## i00

NOTE: I have put this in it's own post as i have run out of room in the main one (has a char limit)

*Users*

i00 (Kris), YafMan, TxDeadhead (Eric), erictam, Polyview, rykk, mrbungle74, skydiver1989ss, jim400, zombietom, SteveHeather, PatnLongBeach, Tim-MTI, lironmiron, KumaranA, radwen, MacShand, s0nlt, Programmer99, Ammar_Ahmad, Jimmy0, Steve Maier, Finbarr (Fin), daveha, Roger Templeton, Emmery Chrisco, Member 3938798, SuperiorCodingMan, kyle pantall, Simon Crowe, ILikeCake, DavidTheProgrammer, crb9000, StupidBomb, pjcobie, Member 8158784, Member 7937192, Member 2262881 (POSabilities Inc.), Member 9401932, BCantor, Jim Meadors, Member 4000809, yefi1455, fredatcodeproject, adils.kiet, Member 8597942, Martz, rfreedlund, dev1287, Member 7954771, Kebrite, Sahil Kanjwani, Member 1369511, TheMperor, Rod A B, Neil Wallace, Member 7676097, E Hindle, tewuapple, D@rwin, SherMags, Member 2986729, Member 2388257, stillflyinghigh, pwned555, KasukuK, Jamie Balfour, Member 8022205, Wafdof, jesseFromSD, Vitaly Pozharov, Globin, nbgangsta, Gagan1118, mfair, hassanlou, reeselmiller2, gcode1, Member 9400237, Crile Crisler, jspano, Hector Rodriguez, TheComputerMan08(Brent), bobiew, Member 1942993, RyanH88, millie33, Sander van H, Member 9975355, BruceG, Corum Ian Halligan, Jim Hersey II, Abinash Bishoyi, xiaobinzhang, hoodch, thomasbovard, jenrenee, Member 10116626, Bondos (Mark Bond), Vader_Oz, DuncanA, Paulo Lopo, tj_m16, Alonesome, Ricks_ideas, mksbala, carlos canales, TimFlan, ConMetMike, notnewcivilman, dave telfer, maitoti, drkajun, ShaggyJim, Nathan Lecompte, rivierabrian, IvyNeg, Member 10337586, Member 10450097, Member 10451799, Kieran Crown, Member 10499080, mimco99, tutor (rob), danpomeroy, Member 9506358

----------


## i00

> something is missing from the walkthrough :
> this line : Imports SpellCheck.i00SpellCheck
> it means some files are needed to be added to the solution explorer or some dll reference ?
> could you please complete the walkthrough


What do you mean? SpellCheck.i00SpellCheck is in the project in the zip file!

SpellCheck is the project namespace and i00SpellCheck is the Namespace in the classes in the "SpellCheck\Spell Check" folder in the zip

Kris




> Regarding the import statement, once you have added any DLL to the project references then check the reference under Imported References (on the Reference tab) you may not need the import statement unless there is a clash with another DLL's namespace.


*There are NO imported dll's (outside the built in .Net ones)* - where are you guys getting this from (LOL)???

And I have the extensions in a namespace within my project ... because they are extensions the imports statement is necessary.

Here is a list of references from my project:
*System*
*System.Core*
System.Data
System.Data.DataSetExtensions
System.Deployment
*System.Design*
*System.Drawing*
*System.Windows.Forms*
System.Xml
System.Xml.Linq

Edit: Even these are excessive ... as these are the standard imports when creating a new Forms project... so I have highlighted in bold the 5 that are actually needed.

Kris




> something is missing from the walkthrough :
> this line : Imports SpellCheck.i00SpellCheck
> it means some files are needed to be added to the solution explorer or some dll reference ?
> could you please complete the walkthrough


Ahh ... i re-read your post and think i mis-understood you before... 

Edit: I updated the OP with details about referencing the project

Kris

----------


## kareninstructor

> *There are NO imported dll's (outside the built in .Net ones)* - where are you guys getting this from (LOL)???


Here from your first post


```
Imports SpellCheck.i00SpellCheck
```

In regards to my reply (which indicates I have not even downloaded the library) about Imported Namespaces, never said there was one.

----------


## kareninstructor

Okay I see now after downloading the solution, works as instructed. What I would suggest is creating a DLL project for the Spell Checker so that all one needs to do is add the DLL to their project to use it.

If you want, the Import statement can be removed as per my first reply so we can do this and all works the same as having the Import statement.


```
'Imports SpellCheck.i00SpellCheck
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ''do not select the text
        TextBox1.SelectionStart = 0
        TextBox1.SelectionLength = 0
```

----------


## i00

> Okay I see now after downloading the solution, works as instructed. What I would suggest is creating a DLL project for the Spell Checker so that all one needs to do is add the DLL to their project to use it.
> 
> If you want, the Import statement can be removed as per my first reply so we can do this and all works the same as having the Import statement.
> 
> 
> ```
> 'Imports SpellCheck.i00SpellCheck
> Public Class Form1
> 
> ...


You don't need a dll, just reference the EXE, and I use the namespace inside my custom i00CodeLib exe because there is alot more than just a spell check in there  :Smilie: 

Kris

----------


## moti barski

> reference my exe file that is output from this project 
> add this 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


how to "reference your exe file that is output from this project and add this project to my solution and reference it" ? step by step plz

I know of the reference technchniques :
1 (project, add reference, choose dll) + an imports statement
2 add classes to the solution explorer then use subs form those classes,
but as for the above I'd like a noob explanation if possible

next :
"the code below may change if you used option 3 to "Imports YourProject.i00SpellCheck")"
what is option 3 ? how would the code below change ? and where to put the dictionary ?

the rest I understood.

also, I agree a dll would also be cool.

----------


## i00

> how to "reference your exe file that is output from this project and add this project to my solution and reference it" ? step by step plz
> 
> I know of the reference technchniques :
> 1 (project, add reference, choose dll) + an imports statement
> 2 add classes to the solution explorer then use subs form those classes,
> but as for the above I'd like a noob explanation if possible
> 
> next :
> "the code below may change if you used option 3 to "Imports YourProject.i00SpellCheck")"
> ...


Ok... on the add reference window select browse then select "SpellCheck.exe"

I prefer referencing exe files because then you can have test harnesses with in each component that the end user can run for debugging.

Kris

----------


## Nightwalker83

Nice! Although, I would removed this line from the first post if I were you.




> DO NOT RE-DISTRIBUTE THIS SOURCE CODE PARTLY OR IN ITS ENTIRETY


Since it is an example that is why you are posting the code so people may use it. Also, you can not say what you have said above when you also say:




> entirely open source


That implies that people may use the project however they wish.

----------


## i00

> Nice! Although, I would removed this line from the first post if I were you.
> 
> 
> 
> Since it is an example that is why you are posting the code so people may use it. Also, you can not say what you have said above when you also say:
> 
> 
> 
> That implies that people may use the project however they wish.


No it means you can use it in your projects ... but if you want to redistribute the source for that app you will need to pre-compile the i00 spell check bit and reference that

Also "entirely open source" means that there are no "closed" components in the project - the user has access to everything!

Kris

----------


## i00

Ok... updated...

fixed a bug where the text box underlines would not always draw initially until the textbox was scrolled or had some text changed,and cleaned up the interface to made it look more professional

Kris

----------


## FreeNoob

This looks nifty I am downloading it in case I need something like this in the future, thanks ^.^

----------


## i00

Will post an update within the next 48 hours with an anagram lookup and scrabble helper :Smilie: 

Kris

----------


## i00

New version is out  :Smilie: 

Now with promised scrabble helper and anagram lookup  :Smilie: 

Things to do now:
Boggle solverCrossword solverDefinition lookupSpell check interface - current spell check only accessed through right click menusAuto correct based on some rules

Kris

----------


## YafMan

I am using i00 Spell check in my project.

It is the first time that I am trying to download a code here that I think can help me in my project. I think this spell checker may be useful.

Thanks for the post.

----------


## Radjesh Klauke

Ola, was just checking this quickly. Is there a way to add multiple dictionaries (languages) and switch between them?

----------


## i00

> Ola, was just checking this quickly. Is there a way to add multiple dictionaries (languages) and switch between them?


Yes you can ... to create a dictionary from scratch:


vb Code:
Dim Dictionary = New i00SpellCheck.SpellCheckTextBox.Dictionary("c:\Custom.dic", True)
        Dictionary.Add("CustomWord1")
        Dictionary.Add("CustomWord2")
        Dictionary.Add("CustomWord3")
        Dictionary.Save()

To then load a saved dictionary:


vb Code:
Dim Dictionary = New i00SpellCheck.SpellCheckTextBox.Dictionary("c:\Custom.dic")

To change dictionaries:
... for all text boxes:

vb Code:
'Set the dictionary:
        i00SpellCheck.SpellCheckTextBox.DefaultDictionary = Dictionary
'update the highlights:
        For Each item In i00SpellCheck.SpellCheckTextBoxes
            item.Value.RepaintTextBox()
        Next

For an individual textbox:


vb Code:
'Set the dictionary:
        TextBox1.SpellCheck.CurrentDictionary = Dictionary
'update the highlights:
        TextBox1.RepaintTextBox()

EDIT: you may need to also clear the dictionary cache's ... didn't think of this when I changed it to cache items to do this clear out
dictCache ... you may need to expose it first then call .clear ... will change this in next version if you need to do this, *so let me know if you do*

Thanks
Kris  :Smilie:

----------


## NtEditor

wow this is just sick. Tell me this 

1) Is it a custom user control like a dialog box or a simple windows form?
2) Can we add the ability to show synonyms / antonyms etc. ?
3) If we add it in a commercial application (working on nteditor) then do we have to add your reference, this forum reference or any other specific license file to be able to distibute it?

Man i have been searching for a script like this for a week. I worked with keyoti, dexperience and nhunspell but all have some flaw or the other. But this works great.

----------


## NtEditor

> wow this is just sick. Tell me this 
> 
> 1) Is it a custom user control like a dialog box or a simple windows form?
> 2) Can we add the ability to show synonyms / antonyms etc. ?
> 3) If we add it in a commercial application (working on nteditor) then do we have to add your reference, this forum reference or any other specific license file to be able to distibute it?
> 
> Man i have been searching for a script like this for a week. I worked with keyoti, dexperience and nhunspell but all have some flaw or the other. But this works great.


No problem with donation or payment but don't want to get into legal issues. Also will we have to disclose the application name if we use this?

----------


## TxDeadhead

OK. Before I start, let me first mention I'm an ignoramus. I learned to program in the early 80s and left programming when OOP became the standard. With that said, I have recently started using Visual Studio 2010 Ultimate to try to design some tools for work. I have a program I'm working on that works great, except that it needs a a Spell Checker. Your project is marvelous and I intend to use it. However, every time I try to put the Imports statement in, I get the following error:

Warning	1	Namespace or type specified in the Imports 'SpellCheck.i00SpellCheck' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.	N:\Users\Eric\Documents\Visual Studio 2010\Projects\QATool with SpellCheck\QATool\QATool.vb	1	9	QATool


When I try to import it into References, I get this one:
References between projects that target different runtimes or.NET Framework profiles are not supported. 

I've tried reBuilding it. No go. What am I doing wrong?

Thanks in Advance,
TxDeadhead

----------


## i00

> wow this is just sick. Tell me this 
> 
> 1) Is it a custom user control like a dialog box or a simple windows form?
> 2) Can we add the ability to show synonyms / antonyms etc. ?
> 3) If we add it in a commercial application (working on nteditor) then do we have to add your reference, this forum reference or any other specific license file to be able to distibute it?
> 
> Man i have been searching for a script like this for a week. I worked with keyoti, dexperience and nhunspell but all have some flaw or the other. But this works great.


1) Not a custom user control, it extends standard text boxes, so you don't need to change all of your existing ones  :Smilie: ... you just call .enablespellcheck and it does the rest, more examples are included in the test app

2) Not atm... maybe look into this in the future ... this will require another dictionary though that links similar words together

3) Not at all, you can either reference the file, or add the components into your project.  You do not have to state in the end product that you're using i00 Spell check, just post here that you are using it as previously stated  :Smilie: . - That said however, *if your project is open source*, you will need to reference the spellcheck.exe rather than redistribute my source code.

Kris

----------


## i00

> OK. Before I start, let me first mention I'm an ignoramus. I learned to program in the early 80s and left programming when OOP became the standard. With that said, I have recently started using Visual Studio 2010 Ultimate to try to design some tools for work. I have a program I'm working on that works great, except that it needs a a Spell Checker. Your project is marvelous and I intend to use it. However, every time I try to put the Imports statement in, I get the following error:
> 
> Warning	1	Namespace or type specified in the Imports 'SpellCheck.i00SpellCheck' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.	N:\Users\Eric\Documents\Visual Studio 2010\Projects\QATool with SpellCheck\QATool\QATool.vb	1	9	QATool
> 
> 
> When I try to import it into References, I get this one:
> References between projects that target different runtimes or.NET Framework profiles are not supported. 
> 
> I've tried reBuilding it. No go. What am I doing wrong?
> ...


I haven't tried this in VS2010, will do over the next few days and let you know

Kris

----------


## i00

New version is out btw  :Smilie:  (was actually out yest, but was pushed for time to post here)

Kris

----------


## i00

> OK. Before I start, let me first mention I'm an ignoramus. I learned to program in the early 80s and left programming when OOP became the standard. With that said, I have recently started using Visual Studio 2010 Ultimate to try to design some tools for work. I have a program I'm working on that works great, except that it needs a a Spell Checker. Your project is marvelous and I intend to use it. However, every time I try to put the Imports statement in, I get the following error:
> 
> Warning	1	Namespace or type specified in the Imports 'SpellCheck.i00SpellCheck' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.	N:\Users\Eric\Documents\Visual Studio 2010\Projects\QATool with SpellCheck\QATool\QATool.vb	1	9	QATool
> 
> 
> When I try to import it into References, I get this one:
> References between projects that target different runtimes or.NET Framework profiles are not supported. 
> 
> I've tried reBuilding it. No go. What am I doing wrong?
> ...


Works fine for me in VS2010 when I change the spellcheck.exe project properties to target ".Net Framework 4.0 client..."

That said I also had to remove the line:

vb Code:
<System.ComponentModel.Browsable(True), Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(UITypeEditor))> _
from my AtuoGrowLabel.vb
This is just to make the designer show the property for the label text property as a multiline editor, so isn't necessary anyway.
Then you can also remove the reference to system.design

If you are still stuck message back.
Hope this helps,
Kris

----------


## Radjesh Klauke

Will start with this next week with VS2010 and let you know.

----------


## i00

> Will start with this next week with VS2010 and let you know.


Cool, let me know how you go...

Also you were asking about custom dictionaries... since the update yesterday, they are now just flat files so you can also create custom ones by just creating a text file, and putting the words into that separated by vbcrlf (enter in notepad)  :Smilie: 

Kris

----------


## Radjesh Klauke

Users should realize that the custom dictionaries shouldn't be added in the Program Files folder, but in the "SpecialFolder...." due to writing permissions.  :Wink:

----------


## i00

> Users should realize that the custom dictionaries shouldn't be added in the Program Files folder, but in the "SpecialFolder...." due to writing permissions.


That is correct, the dictionary is stored in the i00SpellCheck.exe's path in the eg... for a different location (at the moment), the programmer would have to manually load the dictionary by going:

vb Code:
SpellCheckTextBox.DefaultDictionary.LoadFromFile(...)
prior to enablespellcheck is called... and so that doesn't freeze the interface they would have to multi thread this (as it is done when EnableSpellCheck is called)...

In the next release i will put an easier way of changing dictionaries on an individual text field as well as passing in the initial dictionary as an option to EnableSpellCheck.

Kris

----------


## TxDeadhead

Thank you for your response. I've got it to compile and it works. I retargeted my program to .NET 3.51 and changed the imports statement to read: imports i00SpellCheck instead of imports Spellcheck.i00SpellCheck. Now I only have two issues. 

1) The spellchecker doesn't maintain case. If I type Tihs, it suggests this and changes it to this when selected. I'd have expected it to offer This.
2) Once I've built it and tried to publish it, it won't install. 

Other than that, great tool. I'm excited about getting it to work :-)

TxDeadhead

----------


## i00

1) Good point, never noticed tihs  :Stick Out Tongue:  before
2) What does it say, are there any errors?

Edit: just found another bug... helpss's suggests things like helps's whereas it should sugguest helps' ... will fix this too!

Edit: *Have now fixed both bugs mentioned above and will release soon...*

Kris

----------


## TxDeadhead

Greetings, and thank you again for your assistance. 

I have to publish the version I'm having trouble with, as this is a program that I'm using, and I need to finish work before I can troubleshoot. However, I do have another suggestion:

Can we get it to look for odd capitalizations? For example if I type SUpport, it would be nice if it flagged it and suggested that Support might be more appropriate.

Just a thought,
TxDeadhead

----------


## i00

> Greetings, and thank you again for your assistance. 
> 
> I have to publish the version I'm having trouble with, as this is a program that I'm using, and I need to finish work before I can troubleshoot. However, I do have another suggestion:
> 
> Can we get it to look for odd capitalizations? For example if I type SUpport, it would be nice if it flagged it and suggested that Support might be more appropriate.
> 
> Just a thought,
> TxDeadhead


Fixed this case problem in the update too!...
prob post later today or 2morrow  :Smilie: 

Also whats the *exact* problem with publishing?

Kris

----------


## i00

*New version is out*  :Smilie:  with all requested fixes ... except for antonyms ... don't see much point in these

Let me know if the speed of the popup is too slow on a correct word and i will thread the "Change to..." loading - works fine on mine ... but still ...

Kris

----------


## TxDeadhead

Publishing issue: I build and publish the program to my website. I then go to the website and download the setup.exe. It runs and I get an error reading: Application validation did not succeed. Unable to continue. I click on the details button and get the following. I'm going to post it all as I do not know what will be of use to you. The part that seems important to me is the following:
ERROR SUMMARY
	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of http://www.deadhead.org/qatool/QATool.application resulted in exception. Following failure messages were detected:
		+ Reference in the manifest does not match the identity of the downloaded assembly i00SpellCheck.exe.

Thank you for your assistance.
TxDeadhead

Full Detail Report:
PLATFORM VERSION INFO
	Windows 			: 6.0.6002.131072 (Win32NT)
	Common Language Runtime 	: 4.0.30319.239
	System.Deployment.dll 		: 4.0.30319.1 (RTMRel.030319-0100)
	clr.dll 			: 4.0.30319.239 (RTMGDR.030319-2300)
	dfdll.dll 			: 4.0.30319.1 (RTMRel.030319-0100)
	dfshim.dll 			: 4.0.31106.0 (Main.031106-0000)

SOURCES
	Deployment url			: http://www.deadhead.org/qatool/QATool.application
						Server		: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
	Deployment Provider url		: http://www.deadhead.org/qatool/QATool.application
	Application url			: http://www.deadhead.org/qatool/Appli...l.exe.manifest
						Server		: Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635

IDENTITIES
	Deployment Identity		: QATool.application, Version=2.0.0.19, Culture=neutral, PublicKeyToken=9c5c65b666fdad42, processorArchitecture=msil
	Application Identity		: QATool.exe, Version=2.0.0.19, Culture=neutral, PublicKeyToken=9c5c65b666fdad42, processorArchitecture=msil, type=win32

APPLICATION SUMMARY
	* Installable application.

ERROR SUMMARY
	Below is a summary of the errors, details of these errors are listed later in the log.
	* Activation of http://www.deadhead.org/qatool/QATool.application resulted in exception. Following failure messages were detected:
		+ Reference in the manifest does not match the identity of the downloaded assembly i00SpellCheck.exe.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
	No transaction error was detected.

WARNINGS
	There were no warnings during this operation.

OPERATION PROGRESS STATUS
	* [11/9/2011 7:08:46 AM] : Activation of http://www.deadhead.org/qatool/QATool.application has started.
	* [11/9/2011 7:08:46 AM] : Processing of deployment manifest has successfully completed.
	* [11/9/2011 7:08:46 AM] : Installation of the application has started.
	* [11/9/2011 7:08:46 AM] : Processing of application manifest has successfully completed.
	* [11/9/2011 7:08:47 AM] : Found compatible runtime version 2.0.50727.
	* [11/9/2011 7:08:47 AM] : Detecting dependent assembly Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil using Sentinel.v3.5Client, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=msil.
	* [11/9/2011 7:08:47 AM] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
	* [11/9/2011 7:08:47 AM] : Detecting dependent assembly WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil using WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=msil.
	* [11/9/2011 7:08:47 AM] : Detecting dependent assembly System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
	* [11/9/2011 7:08:47 AM] : Detecting dependent assembly System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil using System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=msil.
	* [11/9/2011 7:08:47 AM] : Request of trust and detection of platform is complete.

ERROR DETAILS
	Following errors were detected during this operation.
	* [11/9/2011 7:08:48 AM] System.Deployment.Application.InvalidDeploymentException (RefDefValidation)
		- Reference in the manifest does not match the identity of the downloaded assembly i00SpellCheck.exe.
		- Source: System.Deployment
		- Stack trace:
			at System.Deployment.Application.DownloadManager.ProcessDownloadedFile(Object sender, DownloadEventArgs e)
			at System.Deployment.Application.FileDownloader.DownloadModifiedEventHandler.Invoke(Object sender, DownloadEventArgs e)
			at System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(DownloadQueueItem next)
			at System.Deployment.Application.SystemNetDownloader.DownloadAllFiles()
			at System.Deployment.Application.FileDownloader.Download(SubscriptionState subState)
			at System.Deployment.Application.DownloadManager.DownloadDependencies(SubscriptionState subState, AssemblyManifest deployManifest, AssemblyManifest appManifest, Uri sourceUriBase, String targetDirectory, String group, IDownloadNotification notification, DownloadOptions options)
			at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
			at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState& subState, ActivationDescription actDesc)
			at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
			at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
	No transaction information is available.

----------


## i00

> Publishing issue: I build and publish the program to my website. I then go to the website and download the setup.exe. It runs and I get an error reading: Application validation did not succeed. Unable to continue. I click on the details button and get the following. I'm going to post it all as I do not know what will be of use to you. The part that seems important to me is the following:
> ERROR SUMMARY
> 	Below is a summary of the errors, details of these errors are listed later in the log.
> 	* Activation of http://www.deadhead.org/qatool/QATool.application resulted in exception. Following failure messages were detected:
> 		+ Reference in the manifest does not match the identity of the downloaded assembly i00SpellCheck.exe.
> 
> Thank you for your assistance.
> TxDeadhead


Hrm... did a google ... this one has a potential solution: http://www.clickoncemore.net/documen...ommon_problems

... i personally have never published an app ... just deploy the files  :Smilie: 

Kris

----------


## TxDeadhead

Thank you for pointing me in the right direction. I had to go through several solutions, but I finally found the correct one. I have to sign the Click-Once Manifests on both, and Turn on Click-Once Security on both. It is now working and I am using it on a tool I wrote for work. Thank you for the great work and all the help. I should probably buy a book, instead of trying to figure it all out on my own.

TxDeadhead
aka Eric

----------


## TxDeadhead

Hey Kris,
First of all, thanks. It's working like a charm. Now, I have another question. What's the possibility of adding new words to a customer dictionary that is separate from the main dictionary? Here's why: Every time I make a change to the program and publish it, the user downloads a new version. Every time they do, the dictionary overwrites itself with the one in the build. All words added to the dictionary are lost.

I really appreciate everything!
TxD

----------


## Radjesh Klauke

Is there an ignore-list available?

----------


## TxDeadhead

> Is there an ignore-list available?


Yes. When you select a word, it has an option to ignore word. It shows up right after add to dictionary.

TxD

----------


## i00

> Hey Kris,
> First of all, thanks. It's working like a charm. Now, I have another question. What's the possibility of adding new words to a customer dictionary that is separate from the main dictionary? Here's why: Every time I make a change to the program and publish it, the user downloads a new version. Every time they do, the dictionary overwrites itself with the one in the build. All words added to the dictionary are lost.
> 
> I really appreciate everything!
> TxD


Ok will do this in the next version ... is a good idea anyway  :Smilie:  ... check back in a few days (hopefully will have it done ... maybe a little delay because of Skyrim tho)  :Smilie: 

Kris

----------


## i00

> Is there an ignore-list available?


Do you mean so that it stores a list of ignored words and remembers the ignored words next time? - at the moment it just stores it in the dictionary object with a flag stating that it is ignored, but the ignored words don't get saved in the dictionary so next time you load your app they will appear as spelling errors again...

Kris

----------


## Radjesh Klauke

Thanks for the tip i00, 'cause that is actually very important for my project. I didn't find time to implement this into my project yet. There a few things that need to be done first and it takes more time then expected. (bugfixes etc).

Back to topic: It that possible to implement some kind of standard ignore-list?

here's a screenshot of my project:


As you can see that it would take me 100's if not 1000's of clicks to ignore "standard" types. There are more the 11K standard types within HTML4 and 5 and it will increase (double) when I have implemented CSS and jscript.

----------


## i00

> Thanks for the tip i00, 'cause that is actually very important for my project. I didn't find time to implement this into my project yet. There a few things that need to be done first and it takes more time then expected. (bugfixes etc).
> 
> Back to topic: It that possible to implement some kind of standard ignore-list?
> 
> here's a screenshot of my project:
> 
> 
> As you can see that it would take me 100's if not 1000's of clicks to ignore "standard" types. There are more the 11K standard types within HTML4 and 5 and it will increase (double) when I have implemented CSS and jscript.


Hrm... so you want to spellcheck the syntax?... I would personally consider just spellchecking stuff not in tags and html comments...

But why would you ignore the standard types?... I mean wouldn't you just have a seperate dict for them? Since your project seems to use fast text box (or whatever Its called you prob won't be able to use my spell check without some tweaks anyway... So i would have the dict for comments and stuff not in tags... and another for stuff in tags...

Just my 2 cents
Kris

----------


## Polyview

Sorry for this query but I am an amateur, and I am having problems.
I am using Visual Studio 2010, with NET framework 4
To test the i00 VB.NET Spell Check before adding it to my project (which is currently under development), I tried the following.
1.	I Downloaded the Spell Check Source and Demo Project
2.	I Created a new project in VB 2010 (Visual Studio) and called it Test1SpellCheck
3.	On Form1, I added a Text Box (TextBox1)
4.	On Form1, I added a button (which I named btnCheckSpelling and set the Text to Check Spelling
5.	Using the first option in the Code Project leaflet, i.e.
Reference the i00SpellCheck.exe file that is output from this project
a.	I added the .exe file (The only one I could find was in the bin/debug folder) by using the Project  Add references menu
b.	I then added Imports SpellCheck.i00SpellCheck to the top of the form.  This produced an error and had to be changed to Imports i00SpellCheck.
c.	I added Me.EnableSpellCheck() to the form load event.
d.	I added TextBox1.SpellCheck() to the button click event.
6.	This gave 2 errors and 2 warnings.  I noted that:
7.	Authors references from his project were:
System
System.Core
System.Data
System.Data.DataSetExtensions
System.Deployment
System.Design
System.Drawing
System.Windows.Forms
System.Xml
System.Xml.Linq
8.	These were all there anyway, except for System Design, and I had trouble locating this.. This web note fixed it.
a.	If you are targeting the .NET Framework 4 Client Profile, you cannot reference an assembly that is not in the .NET Framework 4 Client Profile. Instead you must target the .NET Framework 4.  System.design is in this category
b.	I found this could be changed in the compile tab of the project properties under Advanced Compiler Settings.  I then added the reference to System.design.
9.	I then had no errors and no warnings
10.	Everything seemed OK Except that:
11.	When I ran the project:
a.	I typed in a deliberate spelling error in TextBox1
b.	I clicked the spell Check Button
c.	And nothing happened!
12.	Am I missing something in the downloads?  I tried option 3 (Bringing in all the *.vb files into the project, but then I got lots of errors and warnings, and I could not run it.  Sorry to trouble you, but I would love some advice.  Thank you.

----------


## i00

> Sorry for this query but I am an amateur, and I am having problems.
> I am using Visual Studio 2010, with NET framework 4
> To test the i00 VB.NET Spell Check before adding it to my project (which is currently under development), I tried the following.
> 1.	I Downloaded the Spell Check Source and Demo Project
> 2.	I Created a new project in VB 2010 (Visual Studio) and called it Test1SpellCheck
> 3.	On Form1, I added a Text Box (TextBox1)
> 4.	On Form1, I added a button (which I named btnCheckSpelling and set the Text to Check Spelling
> 5.	Using the first option in the Code Project leaflet, i.e.
> Reference the i00SpellCheck.exe file that is output from this project
> ...


You only call enablespellcheck 1ce ... it will enable the spell check on all contained textboxes on that control *BUT ONLY IF THEY ARE MULTILINE* (i will make a work around for this soon...)... if you do it on a form it will also automatically do spellchecking on all owned forms and their text boxes.

This spell check is currently not made to function through a button.. I will probably do this later .... but for now you right click for the correction options.

Kris

----------


## Radjesh Klauke

Ola i00,

Of course I don't want to check the syntax. That would be plain stupid, but... When I would add the syntax into the ignore-list it would only check the rest.

----------


## Polyview

I have changed TextBox1 to multiline as per your advice.  I have also deleted the button and its code.
However my problem is still the same, i.e. nothing happens if I type a deliberate spelling error in TextBox1.  Right clicking gives the following options: "Undo, cut, copy, paste, delete, select all"
My code on the form is:
Imports i00SpellCheck
Public Class Form1
    Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Me.EnableSpellCheck()
    End Sub

End Class

----------


## erictam

I'm using .Net Speel Check..Thx!

----------


## i00

> Ola i00,
> 
> Of course I don't want to check the syntax. That would be plain stupid, but... When I would add the syntax into the ignore-list it would only check the rest.


Is the textbox in your screenshot a control that uses TextboxBase, if not it will need customizing the implementation anyway ... Regardless if it is a control that is opensource I could provide an eg on how to implement it in such a case ...

Kris

----------


## i00

> I have changed TextBox1 to multiline as per your advice.  I have also deleted the button and its code.
> However my problem is still the same, i.e. nothing happens if I type a deliberate spelling error in TextBox1.  Right clicking gives the following options: "Undo, cut, copy, paste, delete, select all"
> My code on the form is:
> Imports i00SpellCheck
> Public Class Form1
>     Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
>         Me.EnableSpellCheck()
>     End Sub
> 
> End Class


Do you have the dictionary files in the same path as your app?

Kris

----------


## Polyview

No!  I do not have the dictionary files referenced in my app.  When I try to add one of the 12 files (one of which is dictonary.vb), I use the Visual Studio- add an existing file option.  The file comes up in the project path OK, but I get a whole heap of errors (49 errors plus one warning if I add all 12 files).

----------


## i00

> No!  I do not have the dictionary files referenced in my app.  When I try to add one of the 12 files (one of which is dictonary.vb), I use the Visual Studio- add an existing file option.  The file comes up in the project path OK, but I get a whole heap of errors (49 errors plus one warning if I add all 12 files).


No i mean reference the .exe file as you are doing then add the dictionary files to the root folder of your project (either place them manually in your application path ... or add the files to your projects root folder and change the "Copy To Output Directory" property to "Copy if newer")

The dictionary files are:
dic.dic - for the word list of correctly spelled words
def.def - for the definitions
syn.syn - for the list of synonyms for the "change to..." option

Kris

----------


## Polyview

Thank you so much.  Your last post was exactly what I needed.  All working great!  Thanks again.
I will be using your spellcheck in my new program (which is still under development)

----------


## rykk

I am evaluating Spell Check and expect to use it in my project.

rykk
WIM Consulting

p.s. No clue where the first post I tried went.

----------


## i00

Thanks for your support guys, and a big thanks to all those from Code Project, where *this project has just won "Best VB.NET article of October 2011"* (hence the spike in downloads  :Smilie: ).

I am still working on this and in a few days plan to release the next version with a spell check dialog and changes (already implemented) mentioned in the 1st post.

As always, if you have any suggestions or off-shoot project suggestions (for other projects that use the dictionary etc; such as the crossword generator) please don't hesitate to let me know.

Thanks again all,
Kris

----------


## i00

New version is out with a spell check dialog  :Smilie: 

Kris

----------


## mrbungle74

I love it. Straight forward, easy to use and implement. 

Any way you can allow it to target .NET 4.0 Client? That's the only issue I'm having.

----------


## TxDeadhead

MrBungle74
You can retarget it yourself by going to Solution. Then to Compile. Then to Advanced Compile Options and choose .Net 4.0 Client for Target Framework.

----------


## mrbungle74

> MrBungle74
> You can retarget it yourself by going to Solution. Then to Compile. Then to Advanced Compile Options and choose .Net 4.0 Client for Target Framework.


Ya, I tried that, and it gave a about 8 errors. I'm trying it again on a different PC to see if I can get it to work. I tested it and re-targeted my frame work in my app and it worked fine. I just worry about re-targeting the app, then pushing out an update with the new framework and things breaking on the end users PC and them having to deal with updating on their end.

UPDATE- I got it working after re-targeting the spellcheck app.

Soooo, 

I am using i00 Spell check in my project!

----------


## i00

> Ya, I tried that, and it gave a about 8 errors. I'm trying it again on a different PC to see if I can get it to work. I tested it and re-targeted my frame work in my app and it worked fine. I just worry about re-targeting the app, then pushing out an update with the new framework and things breaking on the end users PC and them having to deal with updating on their end.
> 
> UPDATE- I got it working after re-targeting the spellcheck app.
> 
> Soooo, 
> 
> I am using i00 Spell check in my project!


Thanks a lot for using this, and if there was anything special that you needed to get it working with 4.0 then please share it here.  I do not have VS2010 so cannot test it on that myself.

Kris

----------


## sbicker

I am going to try this to see if it will work for my purposes.

----------


## dominick

Hello,

 I'm going to use this if I can.

----------


## dominick

The spell checker slows down the repainting and refreshing of the richtextbox I'm using in my project significantly... so I'm wondering how to turn off the spellchecker... and turn it back on when the user wants to see errors...

The reason I want fast repaint/refresh is because I want to use a translucent richtextbox eventually.

Thanks,

Dominick

----------


## skydiver1989ss

Hello i00!! I just want to let you know that I'm going to use your spell-checker in my text editor program. 

Thank you so much for coming up with this brilliant idea!!
Merry Christmas  :Smilie:

----------


## i00

> The spell checker slows down the repainting and refreshing of the richtextbox I'm using in my project significantly... so I'm wondering how to turn off the spellchecker... and turn it back on when the user wants to see errors...
> 
> The reason I want fast repaint/refresh is because I want to use a translucent richtextbox eventually.
> 
> Thanks,
> 
> Dominick


It shouldn't slow down the redrawing that much ... also i am planning to work on an alternate method for painting the errors so that will bypass this issue completely.

As for enabling / disabling the spell checker you can go:


vb Code:
TextBox1.SpellCheck.ShowMistakes = True / False
.. note the above line will look like this in future versions:


```
        TextBox1.SpellCheck.Settings.ShowMistakes = True / False
```

Kris

----------


## dominick

Thanks Kris.

----------


## i00

New version 20120102 is out!

...changes include faster - flicker free rendering, and less ram usage

For more changes check the change log!

Kris

----------


## brandenbass

I am using this in my project.  (A multi-tabbed notepad) 

Thanks!

----------


## mrbungle74

I tried to download the latest version. I can't. The government is blocking the download.

----------


## i00

Yea megaupload was taken down ... there are some links that still work... i will upload it to my rapidshare premium account tonight... the files i put on that don't get deleted.

Kris

----------


## i00

New version is out ... check the change log for changes...

Now use my premium RS account for the downloads - I have never had a file deleted from it ... so don't complain if you don't like RS... @ least RS works  :Smilie: 

Kris

----------


## jim400

Hi Kris,

Great control. I will be using it im one of my projects.

I do have a little problem, which also happens in your sample Test form code. To reproduce the problem, do the following steps:
1. Delete all test in your Test form (rtf box).
2. Type a series of wrong words.
3. Select all text and hit Delete or Backspace.
4. The text disappears, but the sqiggly red lines remaim.

This also happens when I clear the rtf box by setting the Text value to "".

Not sure if this is justv my system (Win 7 64 bit) or others have the same result.

Cheers,
Jim.

----------


## zombietom

FINALLY! Thank you. Works great.
(I will be using i00 .Net Spell Check in my project)

----------


## CrisIsRatedX

I tried to use the spell check in my project but it wouldn't let me run it because 'enablespellcheck' is not part of the form class. I am using .NET 2010 and I would greatly appreciate if you could help. Thank you!

----------


## jim400

Hi Kris - Jim again.

I have found a work-around to fix the squiggly lines remaining after deleting all text in the control. Might be a bit of a kludge, but it works. In your TextBox.vb SpellCheckTextBox class, modified the following:

    Private Sub parentTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles mc_parentTextBox.TextChanged
		'RepaintTextBox()
		'parentTextBox.Invalidate()
		If parentTextBox.TextLength = 0 Then
			If Settings.ShowMistakes Then
				CloseOverlay()
				OpenOverlay()
			End If
		End If
    End Sub

There were a number of typing errors in my first email - I had just spent a couple of hours chainsawing and removing a tree from my driveway, which had come down during all this recent rain. My arms were aching, and I had also been bitten on the wrist by a bull ant. Painful! After all this, my fingers were not finding the correct keys.

Cheers,
Jim.

----------


## SteveHeather

This program is absolutely fantastic, I am new To VB.NET programming, and I just hope that I will be able to produce quality software like this.

Well done, I will be using i00 spell Check in my project, when I can figure out how to do it. I am very new to to all this, I am normally a beta tester for AutoCAD software, but I enjoy this VB.NET programming world.

Steve H

----------


## i00

> Hi Kris - Jim again.
> 
> I have found a work-around to fix the squiggly lines remaining after deleting all text in the control. Might be a bit of a kludge, but it works. In your TextBox.vb SpellCheckTextBox class, modified the following:
> 
>     Private Sub parentTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles mc_parentTextBox.TextChanged
> 		'RepaintTextBox()
> 		'parentTextBox.Invalidate()
> 		If parentTextBox.TextLength = 0 Then
> 			If Settings.ShowMistakes Then
> ...


Thanks for pointing this out ... i will look into this soon ...

Kris

----------


## i00

BTW, downloads may be down at the moment as my internet connection will be down for a few days (worker accidently pulled the cable when putting in a pool next door  :Frown: )

Kris

----------


## i00

*moved

----------


## PatnLongBeach

I just want to say thanks allot for all your time you have put into this project. I freaking love it. I have spent to many hours wasting away trying to fool with Ms Word spell checker and a few others. 

The only thing I changed was the tooltip when the spellcheck was done. It seemed you had to wait till that disappeared before you could click the close button. So I just used your msgbox you had and disabled the tooltip lines.

I'm proudly using this in my project.

Again thanks allot for all your work. Its really appreciated.

Pat

----------


## Tim-MTI

I am using i00 Spell check in my project

----------


## hackerspk

there is no dought this is a great project but it is not working for right to left languages like Urdu, Arabic Persian. please fix it

----------


## lironmiron

I am using i00 Spell check in my project

...and it's awesome!

----------


## hackerspk

if anyone tell me this spellchecker why not support right to left languages?

----------


## Ed Bitzer

Obviously doing something wrong with all the success reported here.  Downloaded 20120202 and there is no SpellCheck.exe in the single SpellCheck folder within.  Unzipped and again no exe in the SpellCheck folder.  When running the SpellCheck.sin under VBExpress2010 I am told it must be converted from an earlier version (peculiar) and then indicates one of more solutions cannot be loaded properly.  Ran debug placing the one exe created in the bin folder into my project and Referencing - but was not recognized by the form.  Need a push.

----------


## i00

I have not tested this with express 2010 ... But the exe that is to be referenced is infact built, so there is no exe in the zip file (as it is open source and against vbforums policy to post links to exe files). The reason you are getting the conversion wizard is because it is written in vs9 (2008).  As for the actual conversion, does it error or is it just like the project file is missing?

Thanks
Kris

----------


## Ed Bitzer

Understood that no exe in zip and must be built.  As indicated when I attempt to update using VBExpress2010 I get message "One or more projects in the solution were not loaded correctly.  The listing shows the three projects with only 1 of 2 files converted for SpellCheck , 1 of 15 for BasicTest, 1 to 306 for i00SpellCheck and 1 of 22 for Test.  

Understanding is now out of my league.  I have never used solutons grouping projects (mine are not that complex<g>).  Wish I could use in some of my personal programs I write for family and friends (I long retired) instead of the typical use of Word's spell check which not all my family has.

Ed

----------


## mGTD

Hi,

i00 Spell Check is very promising and I would really like to use it in my project, but I need it to spell-check documents in Italian.
I tried to use the OpenOffice Italian dictionary, but i00 Spell Check does not use the .aff file for plurals and derived words, so many words are incorrectly marked as wrong. 
I saw that Open Office dictionary support is planned for the next version; can I expect it soon? Or is there a proper Italian dictionary for the current version?

Thanks and congratulations for this cool project.

PS. This project has .NET classes to spell check against OpenOffice Dictionaries, it may be useful: http://nhunspell.sourceforge.net/

----------


## i00

Thanks ... I will look into this in the future, as for now though all of my spare time is occupied by another project.

Kris

----------


## Truzzi

i00 working great, however I really wish there was a property or setting I could utalize to force ucase spelling check, any suggestions?

----------


## wbollen

This looks really promising and super simple to implement in my application! Nicely done!
However, besides english I got to have a swedish dictionary for my freeware app. I tried the one that came with Mozilla spell check plugin as well as the dictionary from Open Office. As noted earlier in the thread these dictionaries are currently not fully supported (many correct words are marked as typos due to missing conjugations etc).

I also noted that accented national characters did not work (like åäöÅÄÖ used in swedish, the show up from dictionary like diamond on a playing card with a questionmark in it).

I will very eagerly wait and see if a new version will support Open Office dictionaries.  :Smilie: 

One more thing..
The project converted nicely to VS 2010 pro, but when I tried to retarget to .NET 4 Client Profile I noticed references to stuff only available in the full framework. If at all possible it would be *really* nice if it would be possible to do some conditional compiling to make the spell checker work with  just client profile? 

Client profile is a recommended download on Windows update and more likely to be installed on users computers.

----------


## ityrrell

Hi

Thanks it's great, I'll be using SpellCheck. 

One question though is there a way to spellcheck a textbox silently and return true/false so that you can show thew dialog if required?

Thanks again
Ian

----------


## wbollen

Since i00 is busy on another project.

mGTD, if you read this: There's another textbox extender project available which handles OpenOffice dictionaries (via nhunspell.dll)  if you are in a hurry. It can be enabled per textbox just as with i00's project. 

Be aware though that the code needed a lot of cleaning up and some adaptions at least in my case... From scratch it just sent my devenv.exe into a dead end loop.

With i00's project I was up and running within 2 minutes or so  :Thumb:  NHunspellTextBoxExtender probably took me a day to clean up, adapt and localize.

----------


## methane95

I am making a boggle game, and the user puts word in a listbox
so when the user press a button it checks how long the word is and gives a point
But I also want to add the spell checker so it deducts the points away if the word is wrong
What property/function do i need to use?
here is an idea I have
For i = 0 to listbox1.items.count - 1
word = listbox1.items(i)
word."check"
if word = "wrong" then
listbox1.removeitem(listbox1.items(i))
end if
next

The problem is i don't know how to check the word.

----------


## gib65

Sorry if this has already been asked: does this software come in C#? Will it ever?

----------


## MacShand

Hi!

I downloaded this and it works perfectly! However, I am trying to get it to work in my own project - I am unsure how to import it into my project and reference it? 

It is a fantastically made spell checker and it would great if it would work. I'd appreciate if someone could help me use it in my application.

Thank you.

----------


## jwinney

Hi, I managed to work out how to get this compiled on VB.Net 2010 but I'm getting some odd results. Only when I enabled the spelling dialog could I see what the spell checker must be seeing.
Can you help?? Thanks

Here's a screen shot:

http://www.cardiffcreative.co.uk/demos/spelling.jpg

----------


## jwinney

> Hi, I managed to work out how to get this compiled on VB.Net 2010 but I'm getting some odd results. Only when I enabled the spelling dialog could I see what the spell checker must be seeing.
> Can you help?? Thanks


Seems it's replacing spaces with the second to last character from the previous word. It starts after the first apostrophe... I took all the apostrophes out and it was better... I guess your recent apostrophe handling change needs some more work?

----------


## MacShand

Jwinney, can you assist me with getting the spell checker to work with my project in vb 2010?

----------


## jwinney

> Jwinney, can you assist me with getting the spell checker to work with my project in vb 2010?


I'm not an expert but here is what I did in detail:

	Open the project in VB 2010 
	Let it do the conversion to a VB 2010 project
	Right Click 'Tests' in the Solution Explorer and Remove 
	Right Click i00SpellCheck in the Solution Explorer -> Properties
	Click the Compile Tab then Advanced Compile Options... button.
	Change Target framework (all configurations) option to .NET Framework 4 -> OK

	Open [Solution Explorer] SpellCheck -> Textbox.vb
	Expand 'Textbox'
	Replace the  parentTextBox_TextChanged sub with this one (by jim400):



```
    Private Sub parentTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles mc_parentTextBox.TextChanged
        'RepaintTextBox()
        'parentTextBox.Invalidate()
        If parentTextBox.TextLength = 0 Then
            If Settings.ShowMistakes Then
                CloseOverlay()
                OpenOverlay()
            End If
        End If
    End Sub
```


	Open [Solution Explorer]  About -> AutoGrowLabel.vb
	Remove the following line from near the top:



```
<System.ComponentModel.Browsable(True), Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(UITypeEditor))> _
```

	File -> Save All
	Build -> Build i00Spellcheck

*In your own project:*

	Project -> Properties
	Click the Compile Tab then Advanced Compile Options... button.
	Change Target framework (all configurations) option to .NET Framework 4 -> OK
	Click the References Tab and Add... Browse and find the i00Spellcheck.exe file from the i00Spellcheck project (SpellCheck\i00SpellCheck\bin\Debug)
	Copy the following files from SpellCheck\i00SpellCheck\bin\Debug to YOUR projects Debug folder

def.def
dic.dic
syn.syn
def (folder)

Add  either Me.EnableSpellCheck() to the Form1_Load or <yourtextbox>.SpellCheck() somewhere else.

(Optional) Add a button with the following code to show full spell check window  <yourtextbox>.SpellCheck.ShowDialog()

----------


## KumaranA

I am using i00 Spell check in my project.

----------


## radwen

I am using i00 Spell check in my project

----------


## MacShand

jwinney, thank you so much for your help! that's it working perfectly.

I am delighted to report, I am now using i00 Spell Check in my project.
Thanks

----------


## i00

> I am making a boggle game, and the user puts word in a listbox
> so when the user press a button it checks how long the word is and gives a point
> But I also want to add the spell checker so it deducts the points away if the word is wrong
> What property/function do i need to use?
> here is an idea I have
> For i = 0 to listbox1.items.count - 1
> word = listbox1.items(i)
> word."check"
> if word = "wrong" then
> ...


Sorry about the delay..

Look at the suggestion look-up in the example project:


vb Code:
Dim Result = i00SpellCheck.SpellCheckTextBox.DefaultDictionary.SpellCheckWord(word)
If Result = SpellCheckTextBox.Dictionary.SpellCheckWordError.OK OrElse Result = SpellCheckTextBox.Dictionary.SpellCheckWordError.CaseError Then
    'word is correct
Else
    'word is incorrect
End If

Kris

----------


## i00

> Sorry if this has already been asked: does this software come in C#? Will it ever?


No plans for it ... but [you can add the vb project to / reference the file from] your c# solution.

Kris

----------


## i00

> Seems it's replacing spaces with the second to last character from the previous word. It starts after the first apostrophe... I took all the apostrophes out and it was better... I guess your recent apostrophe handling change needs some more work?


Hrm interesting ... did u copy and paste a reverse apostrophe in from word? (word has 2 apostrophe's an opening one and the default one)

Thanks
Kris

----------


## jwinney

No reverse quotes that I can see. Here is an example of text copied straight from the textbox where the spellcheck has freaked out a bit. You can try it yourself to see if you get the same issue?

Acceptance of mail for the United States for carrage on the first airmail service in Coata Rica, plain cover addressed to Barcalays Bank, New York,  postmarked 'San Jose Ene 10 1924' cds, violet 'Transito' hs and 'Turrucares/ Ene 11 1924' cds tying 5c light blue, and special violet circular "Correo Aereo/Ene 11 1924/San Jose-Limon" cancels front and verso. Carried on the third of only five flights of the temporary service operated by US Army aeroplanes during suspension of railway communication between San Jose and Puerto Limon from January 5th-15th. This special cancellation is described by O'Niell as being " far from Common" having been seen in only two collections in Costa Rica and he therefore doubted if it had been applied to all correspondence. This was the first airmail service to the Atlantic zone and to the rest of the world, and an event of far reaching importance in the international and social development of Costa Rica. See airmail History of Costa Rica, ISBN 0-9645247-7-5, pp 10-16.

----------


## i00

> No reverse quotes that I can see. Here is an example of text copied straight from the textbox where the spellcheck has freaked out a bit. You can try it yourself to see if you get the same issue?
> 
> Acceptance of mail for the United States for carrage on the first airmail service in Coata Rica, plain cover addressed to Barcalays Bank, New York,  postmarked 'San Jose Ene 10 1924' cds, violet 'Transito' hs and 'Turrucares/ Ene 11 1924' cds tying 5c light blue, and special violet circular "Correo Aereo/Ene 11 1924/San Jose-Limon" cancels front and verso. Carried on the third of only five flights of the temporary service operated by US Army aeroplanes during suspension of railway communication between San Jose and Puerto Limon from January 5th-15th. This special cancellation is described by O'Niell as being " far from Common" having been seen in only two collections in Costa Rica and he therefore doubted if it had been applied to all correspondence. This was the first airmail service to the Atlantic zone and to the rest of the world, and an event of far reaching importance in the international and social development of Costa Rica. See airmail History of Costa Rica, ISBN 0-9645247-7-5, pp 10-16.


Hrm i see now ... will look into this over the next few days

Thanks
Kris

----------


## i00

Found where the problem is  :Smilie: 
That was easy find + fix...

Change the function RemoveWordBreaks in i00SpellCheck > Spell Check > SpellCheck.vb to:



```
    Friend Shared Function RemoveWordBreaks(ByVal Text As String) As String
        If Text <> "" Then
            Dim arr = (From xItem In WordBreakChrs Select System.Text.RegularExpressions.Regex.Escape(xItem)).ToArray
            Text = System.Text.RegularExpressions.Regex.Replace(Text, "[" & Join(arr, "|") & "]", New System.Text.RegularExpressions.MatchEvaluator(Function(x As System.Text.RegularExpressions.Match) New String(" "c, x.Length)))
            'old method
            'For Each item In WordBreakChrs
            '    Text = Replace(Text, item, New String(" "c, Len(item)))
            'Next
            'remove "'" but only for words ending in this eg "chris'" = "chris ", but "heather's" <> "heather s"
            Text = System.Text.RegularExpressions.Regex.Replace(Text, "'(?![A-Z0-9_])", " ", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
        End If
        Return Text
    End Function
```

Will post this in an update in a few days too...
Kris

----------


## jwinney

Brilliant, that seems to have fixed it! Thanks.

----------


## i00

> Brilliant, that seems to have fixed it! Thanks.


No problem

----------


## i00

I have been looking through bugs that people have submitted to post an update... and jim400 and jwinney way of updating the parentTextBox_TextChanged sub to fix the drawing issue when all text is removed from the text box is not very efficient ... a better way is to change the CustomPaint sub as follows:



```
    Private Sub CustomPaint()
        If CurrentDictionary IsNot Nothing AndAlso (CurrentDictionary.Loading = True OrElse CurrentDictionary.Count = 0) Then Exit Sub

        Dim TextHeight As Integer = System.Windows.Forms.TextRenderer.MeasureText("Ag", parentTextBox.Font).Height
        Dim BufferWidth As Integer = System.Windows.Forms.TextRenderer.MeasureText("--", parentTextBox.Font).Width
        Using b As New Bitmap(parentTextBox.ClientSize.Width, parentTextBox.ClientSize.Height)
            Using g = Graphics.FromImage(b)
                g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality

                'Using sb As New SolidBrush(Color.FromArgb(127, Color.Blue))
                '    g.FillRectangle(sb, New RectangleF(0, 0, parentTextBox.Width, parentTextBox.Height))
                'End Using

                Dim FromChar = parentTextBox.GetCharIndexFromPosition(New Point(0, 0))
                Dim ToChar = parentTextBox.GetCharIndexFromPosition(New Point(parentTextBox.ClientRectangle.Width - 1, parentTextBox.ClientRectangle.Height - 1))

                Dim theText As String = RemoveWordBreaks(parentTextBox.Text)

                Dim LetterIndex = FromChar
                Dim LeftSide = Left(theText, FromChar)
                LeftSide = LeftSide.Split(" "c).Last
                Dim RightSide = Right(theText, Len(theText) - ToChar)
                RightSide = RightSide.Split(" "c).First
                FromChar -= Len(LeftSide)
                ToChar += Len(RightSide)

                Dim VisibleText = Mid(theText, FromChar + 1, ToChar - FromChar)

                Dim NewWords As New Dictionary(Of String, Dictionary.SpellCheckWordError)

                If Trim(VisibleText) <> "" Then
                    Dim words = Replace(Replace(VisibleText, vbCr, " "), vbLf, " ").Split(" "c)

                    For iWord = LBound(words) To UBound(words)
                        If words(iWord) <> "" Then
                            Dim P1 = parentTextBox.GetPositionFromCharIndex(LetterIndex)
                            If P1.Y < parentTextBox.Height Then
                                Dim WordState As Dictionary.SpellCheckWordError = Dictionary.SpellCheckWordError.SpellError
                                If dictCache.ContainsKey(words(iWord)) Then
                                    'load from cache
                                    WordState = dictCache(words(iWord))
                                Else
                                    ''item is not in the dict cache
                                    'WordState = SpellCheckWord(words(iWord))
                                    'If dictCache.ContainsKey(words(iWord)) = False Then
                                    '    dictCache.Add(words(iWord), WordState)
                                    'End If
                                    'assume ok for now and add word to be processed
                                    If NewWords.ContainsKey(words(iWord)) = False Then
                                        NewWords.Add(words(iWord), Dictionary.SpellCheckWordError.OK)
                                    End If

                                    WordState = Dictionary.SpellCheckWordError.OK
                                End If
                                If WordState = Dictionary.SpellCheckWordError.OK Then

                                Else
                                    If WordState = Dictionary.SpellCheckWordError.Ignore Then
                                        If Settings.ShowIgnored = SpellCheckSettings.ShowIgnoreState.OnKeyDown AndAlso My.Computer.Keyboard.CtrlKeyDown = False Then
                                            GoTo ContinueFor
                                        ElseIf Settings.ShowIgnored = SpellCheckSettings.ShowIgnoreState.AlwaysHide Then
                                            GoTo ContinueFor
                                        End If
                                    End If

                                    Dim P2 = parentTextBox.GetPositionFromCharIndex(LetterIndex + Len(words(iWord)))
                                    If P2.X = 0 Then
                                        'we are the last char ... :(
                                        P2 = parentTextBox.GetPositionFromCharIndex(LetterIndex + Len(words(iWord)) - 1)
                                        P2.X += System.Windows.Forms.TextRenderer.MeasureText("-" & Right(words(iWord), 1) & "-", parentTextBox.Font).Width - BufferWidth
                                    End If
                                    Dim LineHeight As Integer = GetLineHeightFromCharPosition(LetterIndex)
                                    'P1.Y += LineHeight
                                    P2.Y = P1.Y + LineHeight
                                    'P2.Y = P1.Y

                                    Dim e = New SpellCheckCustomPaintEventArgs With {.Graphics = g, .Word = words(iWord), .Bounds = New Rectangle(P1.X, P1.Y, P2.X - P1.X, P2.Y - P1.Y), .WordState = WordState}
                                    RaiseEvent SpellCheckErrorPaint(Me, e)
                                    If e.DrawDefault Then
                                        Select Case WordState
                                            Case Dictionary.SpellCheckWordError.Ignore
                                                Using p As New Pen(Settings.IgnoreColor)
                                                    g.DrawLine(p, P1.X, P2.Y + 1, P2.X, P2.Y + 1)
                                                End Using
                                            Case Dictionary.SpellCheckWordError.CaseError
                                                DrawWave(g, P1, P2, Settings.CaseMistakeColor)
                                            Case Dictionary.SpellCheckWordError.SpellError
                                                DrawWave(g, P1, P2, Settings.MistakeColor)
                                        End Select
                                    End If
                                End If
                            End If
                        End If
ContinueFor:
                        LetterIndex += 1 + Len(words(iWord))
                    Next

                End If

                If DrawOverlayForm IsNot Nothing Then
                    DrawOverlayForm.SetBitmap(b, 255)
                Else
                    textBoxGraphics.DrawImageUnscaled(b, 0, 0)
                End If

                If NewWords.Count > 0 Then
                    AddWordsToCache(NewWords)
                End If

            End Using
        End Using

    End Sub
```

Kris

----------


## formlesstree4

The use of GoTo makes me cry, sorry ^_^

----------


## i00

The goto is in there because originally there were multiple loops that terminated ... hense the goto ContinueFor was neater.  Also only poor use of goto is bad (spaghetti code) IMHO.

best way to do this for eg:


vb Code:
for x=1 to 10
    for y= 1 to 10
        if something then
            goto ContinueFor
        end if
    next
ContinueFor:
next

Kris

----------


## i00

Posted version 20120608

Kris

----------


## rmoliani

Hello
I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...

well.. i changed the dic.dic to my dic.dic in pt-br..
and worked fine... but some words, with accentuation stay very strange... look in pic...

anybody know how can i correct this?

tks.. and congrats about this project!

----------


## Programmer99

Thanks 
We are going to use i00 spell check in our project

----------


## i00

Posted version 20120609 with support for DataGridViews

Kris

----------


## i00

> Hello
> I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...
> 
> well.. i changed the dic.dic to my dic.dic in pt-br..
> and worked fine... but some words, with accentuation stay very strange... look in pic...
> 
> anybody know how can i correct this?
> 
> tks.. and congrats about this project!


Hello can you send me the dictionary file?

Thanks
Kris

----------


## rmoliani

Hey man...
here is the link to dic..
i took from openoffice...

http://openoffice.c3sl.ufpr.br/contr...ries/pt_BR.zip

----------


## i00

Thanks will have a look today or tomorrow  :Smilie: 

Kris

----------


## rmoliani

Tks Kris.. 
i'm waiting...

----------


## i00

> Tks Kris.. 
> i'm waiting...


Sorry about the delay .. will have a look this weekend ... completely changed the inner workings of the spell checker ... so have been a little too busy

Will post back soon
Kris

----------


## rmoliani

Sure Kris, no problem...
while this i'm looking for other thing in my project...
tks!!

----------


## i00

> Sorry about the delay .. will have a look this weekend ... completely changed the inner workings of the spell checker ... so have been a little too busy
> 
> Will post back soon
> Kris


Hrm ... not entirely sure ... but if you want to look into it...

Check the LoadFromFile function for the dictionary ....

My.Computer.FileSystem.ReadAllText(Filename) seems to load the file incorrectly ... I also tried a streamreader.readtoend... but it had the same result ... let me know if you figure out a way ... till then i will put this on the back burner...

Also you will prob need to change the save function also ... since it uses writealltext... so imagine it would save the file like that even if you get the loading working...

Kris

----------


## i00

Version 20120618 is out, with custom plug in support!

----------


## i00

20120622 is out with plugin support for the FastColoredTextBox control!

Kris

----------


## Finbarr

Hi Kris,
Just a quick note from the UK to say thank you for all your hard work on this project.
I'm using i00SpellCheck in my project which allows forensic scientists to securely record their examination notes (now, with correct spelling!).

As the project is used by scientists internationally, support for Open Office dictionaries would be really cool when you get five minutes!

Once again, thank you for making this available.

Kind regards,
Fin.

----------


## i00

Plan to look into this again soon ...

Will keep you posted...

Btw version 20120625 is out ... with some speedups and test project changed to automatically load the tabs from plugins.

Kris

----------


## daveha

I am using i00 Spell check in my project and it works great!!

----------


## davide119

I hope you don't mind, but I'm looking into this now, and I'll likely use it for a personal project of mine. You did very well in coding this, much appreciated.

----------


## davide119

Umm I'm having problems, I've not used visual basic for a long time, but I get a lot of errors.. would it be possible to get a basic guide for this? like I have no idea if I'm doing the referencing or importing right, and I get an error on the 'Me.EnableSpellCheck()'... don't suppose there's a straight forward video guide? or somethin?

----------


## davide119

I got it working, though lacking the defintions, thanks anyway.

----------


## i00

Glad to know that you got it working  :Smilie:  ... please post what you did to get it working so others may learn if they are having the same issues...

As for a video guide this is a good idea ... I may look into doing this sometime.

Thanks
Kris

----------


## johndmingione

I am attempting to implement your program into mine. However, I am wondering is there a way where I can use this to correct spelling mistakes made in Excel? My program currently let's the User open up a Worksheet in a DataGrid and I'm wondering if I can basically do the same with your program but if when the User uploads the Excel Worksheet it will correct Spelling mistakes there. Let me know if I'm making any sense here I am very new to VB 2010. I was using VB6 previously.

----------


## i00

> I am attempting to implement your program into mine. However, I am wondering is there a way where I can use this to correct spelling mistakes made in Excel? My program currently let's the User open up a Worksheet in a DataGrid and I'm wondering if I can basically do the same with your program but if when the User uploads the Excel Worksheet it will correct Spelling mistakes there. Let me know if I'm making any sense here I am very new to VB 2010. I was using VB6 previously.


What do you mean "in excel" ... your DataGrid that loads the excel documents does it not? the DGV can support spell checking...

In your upload process you could check each word in each cell, and change it accordingly with the spell check engine.

Is this what you meant?
Kris

----------


## johndmingione

What I mean by in Excel is will your Spellcheck work on a DataGrid that's on my form? I use the DataGrid to show a specific Worksheet within a Workbook and let the User edit it in the Form. If I reference your Spellcheck will it SpellCheck it?

----------


## i00

> What I mean by in Excel is will your Spellcheck work on a DataGrid that's on my form? I use the DataGrid to show a specific Worksheet within a Workbook and let the User edit it in the Form. If I reference your Spellcheck will it SpellCheck it?


Yes it does automatically spellcheck data grid views  :Smilie: 

Need to do more than reference tho, isn't hard though... check the OP

Kris

----------


## Maverickz

I will probably use this in my project but I do have a question:

It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?

----------


## Maverickz

I have also noticed that most of the time (seems like not always) if you close the Spell Check dialog window before it finishes checking the entire document you get the following error:

RaceOnRCWCleanup was detected
Message: An attempt has been made to free an RCW that is in use.  The RCW is in use on the active thread or another thread.  Attempting to free an in-use RCW can cause corruption or data loss.

I was able to reproduce this error in your test app. I selected the RichTextBox tab, then clicked the spell check button and then immediately closed it. You may have to do this more than once to reproduce.

Thanks.

----------


## i00

> I will probably use this in my project but I do have a question:
> 
> It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?


It should take a few seconds ... but 12 - 15 seconds seems a little excessive ... I will look into this in a few days ... i changed the way the spell check threads work about a month ago .. will look into optimizing this

Kris

----------


## i00

> I have also noticed that most of the time (seems like not always) if you close the Spell Check dialog window before it finishes checking the entire document you get the following error:
> 
> RaceOnRCWCleanup was detected
> Message: An attempt has been made to free an RCW that is in use.  The RCW is in use on the active thread or another thread.  Attempting to free an in-use RCW can cause corruption or data loss.
> 
> I was able to reproduce this error in your test app. I selected the RichTextBox tab, then clicked the spell check button and then immediately closed it. You may have to do this more than once to reproduce.
> 
> Thanks.


Is this error handled? where is it breaking? - screen shot would be ideal  :Smilie: 

Thanks
Kris

----------


## Maverickz

> Is this error handled? where is it breaking? - screen shot would be ideal 
> 
> Thanks
> Kris


Actually I removed the forms and recompiled the code as a DLL and the errors went away. If I get a chance I'll backup my project and reference the exe instead of the DLL and try to get you more details.
The problem of the slow spell checking times is still present though in the DLL compile though. I may try to convert the dictionary that comes with Firefox to work with your code and see if maybe the dictionary is just too large. It seems like it has a lot of Euro specific spellings that I wouldn't even use anyway, such as "colour" instead of the US "color".

----------


## i00

OK... well let me know how it goes  :Smilie: 

Kris

----------


## i00

> I will probably use this in my project but I do have a question:
> 
> It seems to take a long time to do the initial Spell Check on a file open. For instance, 27 lines of text with an average of about 6 or 7 words per line (many with 4 or less words) it takes about 12-15 seconds to finish. Is this normal?


Interesting I checked the speed on my i7 2.6 GHz and it the spell check engine checks at an average of 60.42 words per second... how many words are visible in your text box (it only checks visible words)?

Even with 27 lines @ 7 words (189) words total, it should take about 3.5 seconds (after redraw time etc)...?!

Can you post the tet in your text box here?

Thanks
Kris

----------


## rfreedlund

I am really impressed with this Spell Check and would love to implement it in a project I am working on. Great job!!

However, I am currently experiencing two issues, which may or may not be related.

The first is that we are using MDI forms for this application and the issue of drawing the correction lines is indeed as feared in your "Possible Issues" segment. It is visible over other windows. It is said that the following code can be used to implement the older "compatible" rendering.

DirectCast(TextBox.SpellCheck, SpellCheckTextBox).RenderCompatibility = True

But I am not sure where this should be located or how. I tried it both before and after EnableSpellCheck(). Before I see nothing on the text box. After, the behavior was as without the .RenderCompatibility being set. I am sure I am probably not implementing it correctly.

The other issue I have had is that the Spell Checking (minus the above stated issue) works fine with multiple MDI forms until I close one of them and try to open another, at which time I receive the error "Cannot access a disposed object". with the following references to the SpellCheck app in the exception dump:

       at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
       at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)

Has anyone seen something similar? Has anyone else tried using it with MDI apps?

Spell Checking is not a must have for this app, but I would love to be able to implement it with this great utility if possible.

----------


## stru4nak

Hi i use Macedonian dictonary i change my dictonary from mk.dic to dic.dic when i load program it doesnt show me errors like it's not load the dictonary
see pic: . Here is my dictonary opened in notepad2  and when in program click removed (some word) from dictonary or add word to dictonary my dic.dic make like this  all cyrilic char is like cubic.
I use this dictonary http://openoffice.c3sl.ufpr.br/contr...ries/mk_MK.zip
Edit.
I change encoding of text from ANSI to UTF-8 now doesnt show cubic like in last picture but it doesnt load dictonary.


[QUOTE=rmoliani;4183110]Hello
I'm trying using i00SpellCheck on my project... and everything is fine.. but... i'm from brazil... and here we have a big problem: accentuation...

well.. i changed the dic.dic to my dic.dic in pt-br..
and worked fine... but some words, with accentuation stay very strange... look in pic...
Change encoding for dictonary to UTF-8  and save file, it may work for your dictonary.

----------


## i00

> Hi i use Macedonian dictonary i change my dictonary from mk.dic to dic.dic when i load program it doesnt show me errors like it's not load the dictonary
> see pic: . Here is my dictonary opened in notepad2  and when in program click removed (some word) from dictonary or add word to dictonary my dic.dic make like this  all cyrilic char is like cubic.
> I use this dictonary http://openoffice.c3sl.ufpr.br/contr...ries/mk_MK.zip
> Edit.
> I change encoding of text from ANSI to UTF-8 now doesnt show cubic like in last picture but it doesnt load dictonary.
> 
> 
> 
> 
> ...


Sorry I am a little confused by this post... did you sort your problem out, also if you did please describe how?

Thanks
Kris

----------


## i00

> I am really impressed with this Spell Check and would love to implement it in a project I am working on. Great job!!
> 
> However, I am currently experiencing two issues, which may or may not be related.
> 
> The first is that we are using MDI forms for this application and the issue of drawing the correction lines is indeed as feared in your "Possible Issues" segment. It is visible over other windows. It is said that the following code can be used to implement the older "compatible" rendering.
> 
> DirectCast(TextBox.SpellCheck, SpellCheckTextBox).RenderCompatibility = True
> 
> But I am not sure where this should be located or how. I tried it both before and after EnableSpellCheck(). Before I see nothing on the text box. After, the behavior was as without the .RenderCompatibility being set. I am sure I am probably not implementing it correctly.
> ...


Since your application is a MDI application, you probably want all controls to use render compatibility.  To do this the best method would probably be to do this:


vb Code:
AddHandler SpellCheckControlExtension.SpellCheckControlAdded, AddressOf SpellCheckControlAddedMe.EnableSpellCheck '.... Private Sub SpellCheckControlAdded(ByVal sender As Object, ByVal e As SpellCheckControlAddedRemovedEventArgs)    Dim SpellCheckTextBox = TryCast(e.Control.SpellCheck, SpellCheckTextBox)    If SpellCheckTextBox IsNot Nothing Then        SpellCheckTextBox.RenderCompatibility = True    End IfEnd Sub

Let me know if this works
Thanks
Kris

*EDIT:*

Also I just checked placing DirectCast(TextBox1.SpellCheck, SpellCheckTextBox).RenderCompatibility = True directly after .EnableSpellCheck() ...
Worked fine for me  :Confused:  ... if you are still stuck maybe you could paste your code?

Thanks
Kris

----------


## stru4nak

For latin language like brazilian who have special characters worked when you change encoding to UTF-8 but for cyrilic language like Macedonian, Russian, Serbian and etc doesn't work, it not show spell correction. So this spellchecker work only for English language.

----------


## rfreedlund

> Since your application is a MDI application, you probably want all controls to use render compatibility.  To do this the best method would probably be to do this:
> 
> 
> vb Code:
> AddHandler SpellCheckControlExtension.SpellCheckControlAdded, AddressOf SpellCheckControlAdded
Me.EnableSpellCheck
 '....
 Private Sub SpellCheckControlAdded(ByVal sender As Object, ByVal e As SpellCheckControlAddedRemovedEventArgs)
    Dim SpellCheckTextBox = TryCast(e.Control.SpellCheck, SpellCheckTextBox)
    If SpellCheckTextBox IsNot Nothing Then
        SpellCheckTextBox.RenderCompatibility = True
    End If
End Sub
> 
> Let me know if this works
> Thanks
> Kris
> ...


Kris,

Thanks for replying. I modified the code as follows to reference only the specific text box, instead of the entire form:

        txtProblem.EnableSpellCheck()
        DirectCast(txtProblem.SpellCheck, SpellCheckTextBox).RenderCompatibility = True

However, I still get the overlay effect:

Spell Checked Text Box:


Another form over top of that text box: 


Also, is there some cleanup I should be doing after my form is closed? When I open up another MDI form after closing the last one, I still get the "Cannot access a disposed object." error.

System.ObjectDisposedException was unhandled
  Message=Cannot access a disposed object.
Object name: 'RichTextBox'.
  Source=System.Windows.Forms
  ObjectName=RichTextBox
  StackTrace:
       at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
       at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
       at i00SpellCheck.SpellCheckFormExtension.ReloadSpellCheckControls(SpellCheckSettings SpellCheckSettings)
       at i00SpellCheck.SpellCheckFormExtension.LoadDictionary(Object oSpellCheckSettings)

Thanks for any help you can provide. If we can't use the SpellCheck on this MDI app, we think we can still utilize it on some standard Windows form app.

----------


## Maverickz

> Interesting I checked the speed on my i7 2.6 GHz and it the spell check engine checks at an average of 60.42 words per second... how many words are visible in your text box (it only checks visible words)?
> 
> Even with 27 lines @ 7 words (189) words total, it should take about 3.5 seconds (after redraw time etc)...?!
> 
> Can you post the tet in your text box here?
> 
> Thanks
> Kris


So I reran my tests using the contents of post #37 in THIS thread:
http://www.vbforums.com/showthread.p...=1#post4089783

Using your dictionary took 13 seconds, using the smaller Firefox dictionary took 6 seconds. I am running on significantly older equipment than you are so I am sure that is part of it. 

When you perform the spell check do you take each word, and the compare it to every word in the entire dictionary?

----------


## i00

> For latin language like brazilian who have special characters worked when you change encoding to UTF-8 but for cyrilic language like Macedonian, Russian, Serbian and etc doesn't work, it not show spell correction. So this spellchecker work only for English language.


Probably the case, sorry but I am not familiar on how to load / save files that contain cyrilic characters from a file.

The functions for loading / saving the dictionaries are in i00SpellCheck\Spell Check\Engine\Dictionary.vb, LoadFromFile() and Save().
The offending lines (I think) are:
Dim fileData = My.Computer.FileSystem.ReadAllText(Filename)
and
My.Computer.FileSystem.WriteAllText(...

If anyone knows how to do this, please let me know  :Smilie: 

Thanks
Kris

----------


## i00

> Kris,
> 
> Thanks for replying. I modified the code as follows to reference only the specific text box, instead of the entire form:
> 
>         txtProblem.EnableSpellCheck()
>         DirectCast(txtProblem.SpellCheck, SpellCheckTextBox).RenderCompatibility = True
> 
> However, I still get the overlay effect:
> 
> ...


Sorry about not replying to this before, forgot about it  :Blush:  ... 

OK ... I found out what the error was ... I had some code in there that never gets called ...
I have fixed this bug and it will be in the next update ... but until then you can replace (or edit - change is in Maroon) the SpellCheck() function in i00SpellCheck\Spell Check\Engine\Extension.vb



```
    <System.Runtime.CompilerServices.Extension()> _
    Public Function SpellCheck(ByVal sender As Control, Optional ByVal AutoCreate As Boolean = True, Optional ByVal SpellCheckSettings As SpellCheckSettings = Nothing) As SpellCheckControlBase
        If SpellCheckControls.ContainsKey(sender) Then
            'exists

        Else
            If AutoCreate Then
                ''create SpellCheckControlBase object and send it back...

                Static plugins As List(Of SpellCheckControlBase) = PluginManager(Of SpellCheckControlBase).GetPlugins

                Dim AcceptedClass = (From xItem In plugins Where xItem.ControlType.IsAssignableFrom(sender.GetType)).FirstOrDefault
                If AcceptedClass IsNot Nothing Then
                    Dim SpellCheckControlAddingEventArgs As New SpellCheckControlAddingEventArgs
                    RaiseEvent SpellCheckControlAdding(Nothing, SpellCheckControlAddingEventArgs)

                    If SpellCheckControlAddingEventArgs.Cancel = True Then
                        Return Nothing
                    End If
                    'create a new instance of the plugin class
                    Dim o = DirectCast(System.Activator.CreateInstance(AcceptedClass.GetType), SpellCheckControlBase) 'TryCast(AcceptedClass.CreateObject, SpellCheckControlBase)
                    If o IsNot Nothing Then
                        SpellCheckControls.Add(sender, o)
                        AddHandler sender.Disposed, AddressOf Control_Disposed
                        o.mc_Control = sender
                        o.DoLoad()
                        RaiseEvent SpellCheckControlAdded(Nothing, New SpellCheckControlAddedRemovedEventArgs With {.Control = sender})
                    Else
                        Return Nothing
                    End If
                Else
                    'no plugins for this control type
                    Return Nothing
                End If
            Else
                'we don't want to automatically this control to check spelling, and it is not enabled already so return nothing
                Return Nothing
            End If
        End If
        If SpellCheckSettings IsNot Nothing Then
            SpellCheckControls(sender).Settings = SpellCheckSettings
        End If
        Return SpellCheckControls(sender)
    End Function
```

Also no cleanup is needed

Kris

----------


## i00

> So I reran my tests using the contents of post #37 in THIS thread:
> http://www.vbforums.com/showthread.p...=1#post4089783
> 
> Using your dictionary took 13 seconds, using the smaller Firefox dictionary took 6 seconds. I am running on significantly older equipment than you are so I am sure that is part of it. 
> 
> When you perform the spell check do you take each word, and the compare it to every word in the entire dictionary?


There are two types of spell checking (Both functions are in i00SpellCheck\Spell Check\Engine\SpellCheck.vb)...



You are talking about the correctness of a word.

This is done in SpellCheckWord()...

This does check if the word is in the dictionary of 150K words, with a few exceptions ... eg a word that is all caps is ignored, numbers etc.



For the actual suggestions (this is done when right clicking on an incorrect word for eg)...

This is done in SpellCheckSuggestions()

It basically takes the whole dictionary and eliminates words based on certain rules, to make a smaller dictionary.

Each word, in the smaller dictionary, is then given a "closeness" rating based on other rules, this is sorted and returned.

Kris

----------


## Maverickz

> There are two types of spell checking (Both functions are in i00SpellCheck\Spell Check\Engine\SpellCheck.vb)...
> 
> You are talking about the correctness of a word.
> 
> This is done in SpellCheckWord()...
> 
> This does check if the word is in the dictionary of 150K words, with a few exceptions ... eg a word that is all caps is ignored, numbers etc.
> 
> Kris


I only briefly looked at the code, and it appears that you load the whole dictionary into an array. Could you build another array (letter, start position, end position) at the same time to indicate where each starting letter in main array begins and ends and then use those values in the for loop to only search words that begin with the same letter? 

For instance the first entry in the second array might be ("a", 1, 5790). So any words you are checking that start with the letter A would then only search the first 5790 words instead of all 150k before realizing that it was misspelled.

This should cut processing time way down.

----------


## i00

> I only briefly looked at the code, and it appears that you load the whole dictionary into an array. Could you build another array (letter, start position, end position) at the same time to indicate where each starting letter in main array begins and ends and then use those values in the for loop to only search words that begin with the same letter? 
> 
> For instance the first entry in the second array might be ("a", 1, 5790). So any words you are checking that start with the letter A would then only search the first 5790 words instead of all 150k before realizing that it was misspelled.
> 
> This should cut processing time way down.


Indexing like this is a good idea... I will put this in my todo list for the next update... will probably be about a week away... the only issue with this is that the dictionary would have to be kept in order ... but no biggie

Thanks for the suggestion btw  :Smilie: 
Kris

----------


## Maverickz

> Indexing like this is a good idea... I will put this in my todo list for the next update... will probably be about a week away... the only issue with this is that the dictionary would have to be kept in order ... but no biggie
> 
> Thanks for the suggestion btw 
> Kris


You are welcome. 

One more performance enhancing suggestion, it looks like you are rebuilding the array for every word that you spell check. If you could make it preload one time and only reload when the dictionary is changed, that should further reduce the processing needed to complete the spell check. That may require the end user to instantiate the object on their main form load but I think the performance gain of not having to re-parse the dictionary for every word would be well worth it.

Oh another option to index and make it easier to properly place new entries would be to just use a separate array for each letter. When you add a new word, add it to the end of the appropriate letter array and then dump the arrays to the dic file in the correct order. and you never get a word in the wrong spot. This might be too much trouble though.

----------


## i00

> You are welcome. 
> 
> *REF 1:* One more performance enhancing suggestion, it looks like you are rebuilding the array for every word that you spell check. If you could make it preload one time and only reload when the dictionary is changed, that should further reduce the processing needed to complete the spell check. That may require the end user to instantiate the object on their main form load but I think the performance gain of not having to re-parse the dictionary for every word would be well worth it.
> 
> *REF 2:* Oh another option to index and make it easier to properly place new entries would be to just use a separate array for each letter. *REF 3:* When you add a new word, add it to the end of the appropriate letter array and then dump the arrays to the dic file in the correct order. and you never get a word in the wrong spot. This might be too much trouble though.


*REF 1:* Yes it does do that as it was faster than using the dictionary directly ... but as you said i could just use toarray 1 time and store that for the use on each word...

*REF 2:* Well the order of the dic probably doesn't matter ... as i could load it from the file and order it there ... when it saves back it would be in order... I was thinking of doing it this way before... as for adding words to it ... well i am going to have a second user dictionary in the next release... plan to anyway so REF 3 will prob be different to your suggestion anyway...

Thanks,
Kris

----------


## Maverickz

> *REF 1:* Yes it does do that as it was faster than using the dictionary directly ... but as you said i could just use toarray 1 time and store that for the use on each word...
> 
> *REF 2:* Well the order of the dic probably doesn't matter ... as i could load it from the file and order it there ... when it saves back it would be in order... I was thinking of doing it this way before... as for adding words to it ... well i am going to have a second user dictionary in the next release... plan to anyway so REF 3 will prob be different to your suggestion anyway...
> 
> Thanks,
> Kris


Awesome! 

Since the current version is basically parsing the whole dictionary twice for every word, I think that preloading the dictionary alone will cut processing time close to in half since it removes one full parse per word. Then the indexing should cut the actual comparisons by close to 1/26 of the current time of the second parse. With those two enhancements speed should go from 12 seconds down to sub second spell checks even on my old hardware. 

I can't wait to try out the next version. Thanks so much for all of your efforts.

----------


## i00

Going .ToArray on my test it took 3187ms... without it, it took 3156ms...

Removing it could also lead to other problems too and can actually slow it down... eg i would have to synclock the dictionary file when looping through it (so if a word is added it won't stuff up for eg), thus when it is spell checking multiple textboxes at the same time it would actually slow it down.

I will do the 1st letter indexing though, right after I do the user dictionary...
Regards,
Kris

----------


## i00

OK ... I have indexed the first letters and the improvement on my test is down from 3156ms to 250ms ... thats over 12.5 times faster!

Since the dictionary has to be indexed it takes slightly longer to load though... about 400ms longer on my pc.

Will get the user dictionary finished and post an update soon  :Smilie: 

Kris

----------


## Maverickz

Yeah I figured it would be a dramatic increase in speed. I also sent you a PM with another idea.

----------


## i00

Ok ... next version is out ... now with a user dictionary, indexed dictionary (for greater speed), and speech recognition (tap F12 2x on a text box)!

Thanks, feedback is appreciated,
Kris

----------


## Maverickz

Amazingly fast now. Thanks!

----------


## i00

> Amazingly fast now. Thanks!


No probs, if you have any other suggestions feel free to let me know  :Smilie: 

Kris

----------


## i00

Just released the version 20120907.

Kris

----------


## yefi1455

I am using i00 Spell check in my project.
Thank you!

----------


## rfreedlund

Kris, 

I finally had time to download the latest version. Your latest release did fix the "Cannot access a disposed object" error that I was getting. However, I am still getting the effect with the wavy lines being drawn over top of forms dragged over the other in the MDI app even after I set it to compatible rendering. Any suggestions? Thanks for your attentiveness.

----------


## rfreedlund

Kris,

Here is an update from yesterday's post. I have been doing more testing on an MDI frames test application that I built and the SpellCheck can work great with MDI frames under two cases I have tested. Setting the compatible rendering to True DOES INDEED WORK, though there is the slight blinking you mentioned which is still very acceptable. My previous post about compatible rendering can be ignored, because that does work for a standard MDI app.
The other thing that I tried is on the Activated and Deactivate events on my MDI Child form. I turn the Spell Checking on and off for the form, and this works acceptably as well if you don't mind seeing the spell check markup disappear on all child windows that aren't active. 

This is a great utility!

However... my MDI frames app isn't totally normal. This is not your fault. It is our application. We are not using standard text boxes and rich text boxes in our app. We are using "extended" text boxes which include features that we use specific to our app. The EnableSpellCheck grabs a hold of our "enhanced" text box just fine. However, the DisableSpellCheck doesn't seem to want to let our "enhanced" text box go so the spell check markup remains drawn over top of new child windows that are opened. Once again, this is not a problem with your code (which is a fun read), it is on our end and I am looking into what might be causing the issue.

One question I have knowing that you are placing a drawing object over the text box in order to facilitate the spelling error markup. Is it currently possible to programmatically reference and hide these drawing objects for any particular text box or the form as a whole? Perhaps I can just hide the drawing objects temporarily when a child window is not active and then display them again when the child form is active again. I have just started looking more through your code and might find the answer or how to do it myself, but you have been very helpful.

Thanks.

----------


## rfreedlund

Another Update!! We're getting closer! Because our "enhanced" text boxes are just an extension of the standard windows control, by referencing the TextBox control inside of our custom text box, the SpellCheck seems to work just fine. I'll keep you informed, but it is looking promising!

----------


## rfreedlund

With some adjustments to my code it appears that very soon I will be able to post the words "I am using i00SpellCheck in my project". It has been working very well. 

However, I just ran into an error that occurred when checking a Rich Text box with bullets.

When I right clicked on the word "immediately" preceded by a bullet and marked as incorrect by Spell Check I received the following exception error:



There is more to the error, but here are some of the details:

************** Exception Text **************
System.ArgumentNullException: Value cannot be null.
Parameter name: outer
   at System.Linq.Enumerable.Join[TOuter,TInner,TKey,TResult](IEnumerable`1 outer, IEnumerable`1 inner, Func`2 outerKeySelector, Func`2 innerKeySelector, Func`3 resultSelector)
   at i00SpellCheck.UserDictionaryBase.SpellCheckSuggestions(String Word) in C:\Users\RobertF\Desktop\SpellCheck\i00SpellCheck\Spell Check\Engine\Dictionary\Base Ext\UserDictionary\UserDictionaryBase.vb:line 75
   at i00SpellCheck.Menu.AddSpellItemsToMenu.AddItems(String Word, Dictionary Dictionary, Definitions DefinitionSet, Synonyms Synonyms, SpellCheckSettings Settings) in C:\Users\RobertF\Desktop\SpellCheck\i00SpellCheck\Spell Check\Engine\Menu.vb:line 297
   at i00SpellCheck.SpellCheckTextBox.ContextMenuStrip_Opening(Object sender, CancelEventArgs e) in C:\Users\RobertF\Desktop\SpellCheck\i00SpellCheck\Spell Check\Controls\TextBox\Menu.vb:line 371
   at System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)


I don't believe my users will be putting in too many bulleted items in the rich text field, but it is something that I might need to address before implementing the SpellCheck.

I'm still loving it, though. Thanks!!

----------


## rfreedlund

For whatever reason when pasting text from Word or Outlook that includes bulleted or numbered lists, the tab between the bullet and the list wasn't being replaced with a space in code processing. I am not very familiar with the .NET regular expressions implementation, but by just adding the following line to last part of processing in the RemoveWordBreaks function in Formatting.vb, I was able to fix my problem.

                Text = Text.Replace(vbTab, " ")

It appears that the Regex processing is checking for tabs, but wasn't removing it from a bulleted list. Rather than mess with the Regex, I did a simple replace which works acceptably for me and solved the problem. 

Pasting from other apps seems to give some interesting results (it isn't something that I believe will happen often in my app), but this utility is still very good.

----------


## i00

> With some adjustments to my code it appears that very soon I will be able to post the words "I am using i00SpellCheck in my project". It has been working very well. 
> 
> However, I just ran into an error that occurred when checking a Rich Text box with bullets.
> 
> When I right clicked on the word "immediately" preceded by a bullet and marked as incorrect by Spell Check I received the following exception error:
> 
> 
> 
> There is more to the error, but here are some of the details:
> ...


I actually found this issue yesterday ... the error is in i00SpellCheck\Spell Check\Engine\Dictionary\Flat File\FlatFileSpellCheck.vb

you need to change the bit that goes:


vb Code:
'add words that start with that letter onlyDim DicWords As List(Of String) = IndexedDictionary.Item(Word)If DicWords Is Nothing Then Return Nothing

to:



```
'add words that start with that letter only
Dim DicWords As List(Of String) = IndexedDictionary.Item(Word)
If DicWords Is Nothing Then Return New List(Of SpellCheckSuggestionInfo)
```

Will post an update later that fixes this issue

Regards,
Kris

----------


## i00

20120914 is out ... Version changes can be found here

Kris

----------


## Martz

I am using i00 Spell check in my project :Big Grin:

----------


## Martz

Just a quick question. I'm using VS 2010 and when i use me.enablespellcheck() it doesn't work. When I enable the spell check for each and every textbox then it works. Is there something I can do so that I only have to add one line of code to all my forms?

Still a great product. I've been looking for this for a long time.

----------


## rfreedlund

Kris,

Thanks for the last update, it does keep the SpellCheck from throwing an exception.

However, the tabs still aren't being parsed out properly in the case I mentioned previously. The word Immediately (and others) is still being underlined as misspelled (with the preceding bullet followed) . I implemented the change again in the Formatting.vb code to replace tabs with spaces and it worked. 

Thanks again for your great utility.

----------


## rfreedlund

*I am using i00 Spell check in my project!*

----------


## i00

> Just a quick question. I'm using VS 2010 and when i use me.enablespellcheck() it doesn't work. When I enable the spell check for each and every textbox then it works. Is there something I can do so that I only have to add one line of code to all my forms?
> 
> Still a great product. I've been looking for this for a long time.


Hrm ... my advice would be to create a new project ... run through the steps ... and see if you can get it working in that.

I have got it working with 2012, but do not have 2010 to test with.

Are you doing anything "special"?  Can you provide code?

Thanks
Kris

----------


## i00

> Kris,
> 
> Thanks for the last update, it does keep the SpellCheck from throwing an exception.
> 
> However, the tabs still aren't being parsed out properly in the case I mentioned previously. The word Immediately (and others) is still being underlined as misspelled (with the preceding bullet followed) . I implemented the change again in the Formatting.vb code to replace tabs with spaces and it worked. 
> 
> Thanks again for your great utility.


Hrm ... I'll have a look at this, I also just released another version that should be faster and has a few bug fixes.

Kris

----------


## i00

Just released 20121102 ... Version changes can be found here

... now features karaoke for text to speech (not as tacky as it sounds)!

Kris

----------


## b01000100

I may be dumb, but I am missing something on this.  Is there a way to add this to a custom control and then get the same functionality to carry up in the process?  I have this added on a custom control and it works perfectly.  If I put the custom control into a new form, I cannot the functionality to work inside of that custom control that is displayed.  Is there an easy way to get that part to work?  I have tried i00SpellCheck added to both at this time.  In just the custom control, it is awesome.  I would just like it to work outside of the custom control right now.  Any ideas?  I apologize if this is really easy.  I could not see an easy way to do it.

----------


## i00

> I may be dumb, but I am missing something on this.  Is there a way to add this to a custom control and then get the same functionality to carry up in the process?  I have this added on a custom control and it works perfectly.  If I put the custom control into a new form, I cannot the functionality to work inside of that custom control that is displayed.  Is there an easy way to get that part to work?  I have tried i00SpellCheck added to both at this time.  In just the custom control, it is awesome.  I would just like it to work outside of the custom control right now.  Any ideas?  I apologize if this is really easy.  I could not see an easy way to do it.


It should work... For the second form to be spellchecked it must be owned by a form that also has the spell check enabled on it...

Are other text controls on the 2nd form (where your custom control is that isn't working with the spell check) working with the spell check?

Kris

----------


## b01000100

> It should work... For the second form to be spellchecked it must be owned by a form that also has the spell check enabled on it...
> 
> Are other text controls on the 2nd form (where your custom control is that isn't working with the spell check) working with the spell check?
> 
> Kris


Hmm, it would seem as if something is not being done correctly on my end.  On my custom control (includes an RTB, a menu, and a few buttons), I have a reference to i00SpellCheck.exe, I have Imports i00SpellCheck at the top of my code, and I have Me.EnableSpellCheck() in the Load event of the custom control.  There are no other references made to i00SpellCheck.  If I run that project and get the temporary window for the custom control, i00SpellCheck is a beast.  The moment I spell a word incorrectly, I get the little red squiggly line.  The menu functionality works perfectly.  It all works as expected.

So, I created a brand new project.  I put a multiline text box on it,  an RTB on it, and I dropped my custom control on it.   I have a reference to i00SpellCheck.exe, I have Imports i00SpellCheck at the top of my code, and I have Me.EnableSpellCheck() in the Load event of the new project's form.  I start the project, but the spell checking stuff just does not work on any of the controls.  I put the two projects side-by-side to see if I was missing something, but everything appears to be exactly the same between them. 

Any ideas from all of that?  I appreciate the help.  I have tried all kinds of things , but with no success.

----------


## jesseFromSD

I am using this in a project.

I ran into a strange issue... This works just fine when I run it from Visual Studio 2010 but when I deploy as a ClickOnce application it installs without issue but there is no spell check. No errors or anything it just doesn't work. 

I thought maybe it had to do with including two additional projects (i00BindingList and i00SpellCheck) in my solution but from what I can tell I've done it correctly.

Any ideas?

----------


## i00

> Hmm, it would seem as if something is not being done correctly on my end.  On my custom control (includes an RTB, a menu, and a few buttons), I have a reference to i00SpellCheck.exe, I have Imports i00SpellCheck at the top of my code, and I have Me.EnableSpellCheck() in the Load event of the custom control.  There are no other references made to i00SpellCheck.  If I run that project and get the temporary window for the custom control, i00SpellCheck is a beast.  The moment I spell a word incorrectly, I get the little red squiggly line.  The menu functionality works perfectly.  It all works as expected.
> 
> So, I created a brand new project.  I put a multiline text box on it,  an RTB on it, and I dropped my custom control on it.   I have a reference to i00SpellCheck.exe, I have Imports i00SpellCheck at the top of my code, and I have Me.EnableSpellCheck() in the Load event of the new project's form.  I start the project, but the spell checking stuff just does not work on any of the controls.  I put the two projects side-by-side to see if I was missing something, but everything appears to be exactly the same between them. 
> 
> Any ideas from all of that?  I appreciate the help.  I have tried all kinds of things , but with no success.


Can you send me the "brand new" project that you created that doesn't work?

Thanks,
Kris

----------


## i00

> I am using this in a project.
> 
> I ran into a strange issue... This works just fine when I run it from Visual Studio 2010 but when I deploy as a ClickOnce application it installs without issue but there is no spell check. No errors or anything it just doesn't work. 
> 
> I thought maybe it had to do with including two additional projects (i00BindingList and i00SpellCheck) in my solution but from what I can tell I've done it correctly.
> 
> Any ideas?


This has been brought up before, unfortunately I have never used click once though so won't be much help.  I have suggested that it may be a referenced project is missing in the past, are all of the files there when you deploy?

Also how have you put them in your project, is i00 Spell Check just referenced, if it is try referencing i00 Binding List from your project also?
You may also have more luck if you actually add the i00 Spell Check and i00 Binding List projects to your solution.

Let me know how you go,
Thanks,
Kris

----------


## jesseFromSD

> This has been brought up before, unfortunately I have never used click once though so won't be much help.  I have suggested that it may be a referenced project is missing in the past, are all of the files there when you deploy?
> 
> Also how have you put them in your project, is i00 Spell Check just referenced, if it is try referencing i00 Binding List from your project also?
> You may also have more luck if you actually add the i00 Spell Check and i00 Binding List projects to your solution.
> 
> Let me know how you go,
> Thanks,
> Kris


The EXEs for i00BindingList and i00SpellCheck are both in the deployed files. I put both of the projects in my solution and also added the reference to i00BindingList to the project. Unfortunately it's the same problem. Works from VS but not when deployed.

I'll keep playing around and report back if I get it figured out. Thanks for the reply!

----------


## i00

> The EXEs for i00BindingList and i00SpellCheck are both in the deployed files. I put both of the projects in my solution and also added the reference to i00BindingList to the project. Unfortunately it's the same problem. Works from VS but not when deployed.
> 
> I'll keep playing around and report back if I get it figured out. Thanks for the reply!


Thanks, hope you do find out what is going on so you can inform me.

Thanks again,
Kris

----------


## Finbarr

Hi there - I'm trying to update to the latest version, but am getting the following error message when I click on the download link here and at CodeProject:


```
Server Error in '/Downloader' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
 
Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
```

I also noted a bug in the previous version, if I minimize a form with an RTF control containing a red underlined spelling mistake, the application crashes with the following error:


```
System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at i00SpellCheck.SpellCheckTextBox.CustomPaint()
at i00SpellCheck.SpellCheckTextBox.RepaintControl()
at i00SpellCheck.SpellCheckTextBox.parentTextBox_ForOverlay_SizeChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
```

Otherwise, a superb piece of code, looking forward to seeing the latest version!

Kind regards,
John.

----------


## i00

> Hi there - I'm trying to update to the latest version, but am getting the following error message when I click on the download link here and at CodeProject:
> 
> 
> ```
> Server Error in '/Downloader' Application.
> Runtime Error
> Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
>  
> Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".
> ...


The bug has been fixed with the minimizing of an RTF form I think in the new version... Also downloads should be up now... a Microsoft update stuffed my server.

Regards,
Kris

----------


## i00

20130114 is out! ... for version changes click here.

Kris

----------


## Finbarr

Kris,
Just to let you know - I d/l a copy of the new code (1102) and all the issues I saw were fixed.

I'll d/l this latest release to see what's new!

Kind regards,
John.

----------


## Adviser

> Hrm ... not entirely sure ... but if you want to look into it...
> 
> Check the LoadFromFile function for the dictionary ....
> 
> My.Computer.FileSystem.ReadAllText(Filename) seems to load the file incorrectly ... I also tried a streamreader.readtoend... but it had the same result ... let me know if you figure out a way ... till then i will put this on the back burner...
> 
> Also you will prob need to change the save function also ... since it uses writealltext... so imagine it would save the file like that even if you get the loading working...
> 
> Kris


I can look this, because I fluently work with Cyrillic symbols. But I have some problems  :Smilie:  First I'am C# programmer. It's not a big problem, I understand your code mostly. Second - I want to ask you where you got .syn and .def files for english? I got OpenOffice ru dictionary, but there are only two files: aff and dic. And dic format differ from you. Added /J /H /O /E /G /LQU /AS ... keys. So if you say me how I can convert dictionary into your format I will help with solving this problem.

----------


## Adviser

I tried to use hunspell extension, like in your tests. It works fine with all three files: dic,af,dat. But only by F7. 
Looks like you filter keypress and block all non english characters on input. So if any non english char pressed it even not try to find suggested words (functions from hunspell not fired). Where did you filter keys, pressed in RichTextBox?

----------


## Adviser

Found a problem. Dictionary.Formatting.AllInCaps(). It incorrectly count char uppercase for non-english languages.

Also found one more bug. 

private void ucMessageText_Load(object sender, EventArgs e)
        {
            try
            {
                HunspellDictionary dic = new HunspellDictionary();
                dic.LoadFromFile(Directory.GetCurrentDirectory() + "\\Dicts\\ru_RU.dic");
                i00SpellCheck.Dictionary.DefaultDictionary = dic;
                HunspellSynonims synonims = new HunspellSynonims();
                synonims.File = Directory.GetCurrentDirectory() + "\\Dicts\\th_ru_RU.dat";
                i00SpellCheck.Synonyms.DefaultSynonyms = synonims;

                //If you wanted to pass in options you can do so by handling the ControlExtensionAdding event PRIOR to calling EnableControlExtensions:
                ControlExtensions.ControlExtensionAdding += ControlExtensionAdding;

*                rtb1.SpellCheck(true, null).Settings.IgnoreWordsInUpperCase = false;
                rtb2.SpellCheck(true, null).Settings.IgnoreWordsInUpperCase = false;
*            }
            catch (Exception ex)
            {
                Logger.Error(MethodBase.GetCurrentMethod(), ex);
            }
            this.EnableControlExtensions();

        }

        //This is used to setup spell check settings when the spell check extension is loaded:
        static i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;//Static for settings to be shared amongst all controls, use "i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;" in the method below for control specific settings...
        private void ControlExtensionAdding(object sender, i00SpellCheck.MiscControlExtension.ControlExtensionAddingEventArgs e)
        {
            var SpellCheckControlBase = e.Extension as SpellCheckControlBase;
            if (SpellCheckControlBase != null)
            {
                //i00SpellCheck.SpellCheckSettings SpellCheckSettings = null;
                if (SpellCheckSettings == null)
                {
                    SpellCheckSettings = new i00SpellCheck.SpellCheckSettings();
                    SpellCheckSettings.AllowAdditions = true; //Specifies if you want to allow the user to add words to the dictionary
                    SpellCheckSettings.AllowIgnore = true; //Specifies if you want to allow the user ignore words
                    SpellCheckSettings.AllowRemovals = false; //Specifies if you want to allow users to delete words from the dictionary
                    SpellCheckSettings.AllowInMenuDefs = true; //Specifies if the in menu definitions should be shown for correctly spelled words
                    SpellCheckSettings.AllowChangeTo = true; //Specifies if "Change to..." (to change to a synonym) should be shown in the menu for correctly spelled words
                }
                SpellCheckControlBase.Settings = SpellCheckSettings;
            }
        }

If bolded settings enabled (so if we want to set different settings for controls) we receive Object reference not set to an instance of an object. exception on 
Private Sub extTextBoxContextMenu_MenuOpening
*If Settings.IgnoreWordOverride(extTextBoxContextMenu.MenuSpellClickReturn.Word) Then* 
line. Underlined is null.

It happens only if same one ContextMenuStrip linked to different RichTextBoxElements.

----------


## i00

> I can look this, because I fluently work with Cyrillic symbols. But I have some problems  First I'am C# programmer. It's not a big problem, I understand your code mostly. Second - I want to ask you where you got .syn and .def files for english? I got OpenOffice ru dictionary, but there are only two files: aff and dic. And dic format differ from you. Added /J /H /O /E /G /LQU /AS ... keys. So if you say me how I can convert dictionary into your format I will help with solving this problem.


Hi,

Would be great if you could look @ that symbol problem  :Smilie: .

The syn file I built from Word... check out the project included in my download: ~Used\~Related projects\Build change to from word\WindowsApplication6.sln
The def file I built from WordNet.

As for converting the OpenOffice dictionaries into a flat file, I am not sure if this would be easily possible, they kind of use word rules to build words, so run could be combined with ing to get running... but don't know enough about the files themselves to do this.

Regards,
Kris

----------


## i00

> I tried to use hunspell extension, like in your tests. It works fine with all three files: dic,af,dat. But only by F7. 
> Looks like you filter keypress and block all non english characters on input. So if any non english char pressed it even not try to find suggested words (functions from hunspell not fired). Where did you filter keys, pressed in RichTextBox?


I haven't filtered keys... think there must be something more going on here....
Don't have a non-English keyboard, so not exactly sure how to test this either... but...
I would check the files under "i00SpellCheck\Spell Check\Controls\TextBox\"

Thanks,
Kris

----------


## i00

> Found a problem. Dictionary.Formatting.AllInCaps(). It incorrectly count char uppercase for non-english languages.


Don't know what I was thinking when I wrote that function ... try this:?

VB Code:
Public Shared Function AllInCaps(ByVal CompareWord As String) As Boolean
            If CompareWord = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(CompareWord) Then
                'all letters in this word are caps
                Return True
            End If
        End Function




> Also found one more bug.


Will check this one out tomorrow... am tired as atm

Regards,
Kris

----------


## i00

> Also found one more bug. 
> 
> private void ucMessageText_Load(object sender, EventArgs e)
>         {
>             try
>             {
>                 HunspellDictionary dic = new HunspellDictionary();
>                 dic.LoadFromFile(Directory.GetCurrentDirectory() + "\\Dicts\\ru_RU.dic");
>                 i00SpellCheck.Dictionary.DefaultDictionary = dic;
> ...


I cannot get this to duplicate ... can you provide me with a test form where this is the case?

Thanks,
Kris

----------


## Adviser

> I cannot get this to duplicate ... can you provide me with a test form where this is the case?


Sure: 
http://www.sendspace.com/file/vivck3
Or you can do next steps:
1. Create empty Windows Forms application
2. Add *two* RichTextBoxes to form
3. Add *one* ContextMenuStrip. Link two RichTextBoxes with this one ContextMenuStrip.
4. Write OnLoad:  this.EnableControlExtensions(); 
5. Run. Try to open context menu in any of RichTextBoxes. 

First time extTextBoxContextMenu_MenuOpening work ok. But second time (don't understand why it called two times) will be error because extTextBoxContextMenu.MenuSpellClickReturn == null.

----------


## i00

> Sure: 
> http://www.sendspace.com/file/vivck3
> Or you can do next steps:
> 1. Create empty Windows Forms application
> 2. Add *two* RichTextBoxes to form
> 3. Add *one* ContextMenuStrip. Link two RichTextBoxes with this one ContextMenuStrip.
> 4. Write OnLoad:  this.EnableControlExtensions(); 
> 5. Run. Try to open context menu in any of RichTextBoxes. 
> 
> First time extTextBoxContextMenu_MenuOpening work ok. But second time (don't understand why it called two times) will be error because extTextBoxContextMenu.MenuSpellClickReturn == null.


OK... that was easy ... basically the content menu events are being fired 2x ... 1 time for each control extension ... as the context menu is shared between 2 controls...

Basically to fix ... you will need to edit i00SpellCheck\Control Extension\TextBox\Plugins\extTextBoxContextMenu.vb

You will need to find "Handles ContextMenuStrip." in this file and after each of these lines insert:


vb Code:
If DirectCast(sender, System.Windows.Forms.ContextMenuStrip).SourceControl IsNot MyBase.Control Then Return

This will basically terminate the event if it is not linked to the current control extension.

Will be fixed in the next version.

Regards,
Kris

----------


## jhwilliams1985

Hello,

I know you may hear this many times but I am trying to use the software that you have listed to add to my own VB.NET program. I have made a simple program that I have uploaded with what I have done with the program but the spell check is not working. I have also tried the following code 

"'To load a single control extension on a control call: 
ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)" 

with in my system and it did not work. it said that the textboxprinter.textboxprinter did not exist so I could not use that feature like you said.

I have zipped the full file, but the full file wont upload. (If you want to see full file, I can Email.) I took 3 screen shots showing Code, what program looks like, also the page showing the references with I00SpellCheck was listed.

Is there any help that you can provide that I am doing wrong?

Thank You

John.

----------


## i00

> Hello,
> 
> I know you may hear this many times but I am trying to use the software that you have listed to add to my own VB.NET program. I have made a simple program that I have uploaded with what I have done with the program but the spell check is not working. I have also tried the following code 
> 
> "'To load a single control extension on a control call: 
> ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)" 
> 
> with in my system and it did not work. it said that the textboxprinter.textboxprinter did not exist so I could not use that feature like you said.
> 
> ...


Hi John,

Do the words underline when you do this?  If not check the dic.dic file is in your application path .... if this still doesn't work ... send me a screen shot of your output directory and you projects solution tree with all branches expanded... or upload to something like rapidshare if you cannot post an attachment on here.

Just some things to note:
You shouldn't need to call EnableControlExtensions and then TextBox1.EnableSpellCheck etc.To load the TextBoxPrinter Plugin (that you are trying to do when you call _ControlExtensions.LoadSingleControlExtension(TextBox1, New TextBoxPrinter.TextBoxPrinter)_) you will need to add a reference to that plugin dll, (this is not required if loading all plugins, just to load specific ones, if you want to load all plugins you just need to put the dll in the same folder).

Regards,
Kris

----------


## jhwilliams1985

Hello Kris;

No I don't get any words underlined, I have checked the DIC.DIC file and it looks good. 
With in the Solution tree it had the My Project and Form1. I have added the file to rapidshare.com so you can look at it.

https://rapidshare.com/files/4003728...stSpelling.zip

Thank you
John.

----------


## jhwilliams1985

Hello Kris,

I just figured it out also found your basic example that helped. 

Looks like the Dic, Def, Syn, also Def folder did not copy to the debug folder. You may want to make a note of that so other's know.

Thank You
John

----------


## i00

> Hello Kris,
> 
> I just figured it out also found your basic example that helped. 
> 
> Looks like the Dic, Def, Syn, also Def folder did not copy to the debug folder. You may want to make a note of that so other's know.
> 
> Thank You
> John


Glad you worked it out ... only the dic.dic file is required for spelling...

The def.def shows word definitions in the context menu when right clicking and for suggestions as a tooltip when you hold over a word.
The syn.syn holds a list of synonyms for the "change to" option
The def folder shows icons in some word definitions... eg game

Kris

----------


## BruceG

I am using i00 Spell check in my project.
Great work, Kris. I'm glad I found this.

----------


## i00

20130521 is out!

----------


## crater

> 20130521 is out!


I still cannot get it to build, I'm targeting version 4.0 of the .net framework. I tried replacing the code as suggested in earilier posts but I get something like 400+ errors. 

I'm on vs 2010 with my app targeting v.4.0.

Are there plans on targeting a higher framework?

----------


## i00

> I still cannot get it to build, I'm targeting version 4.0 of the .net framework. I tried replacing the code as suggested in earilier posts but I get something like 400+ errors. 
> 
> I'm on vs 2010 with my app targeting v.4.0.
> 
> Are there plans on targeting a higher framework?


I have it running in 2013 without any problems ...
Here's how:
Open it up and run the conversion wizard
Change the target framework
Reference System.Xaml (like it says to in the error list)
... all 43 errors fixed  :Smilie: 

Kris

----------


## ConMetMike

I am using i00 Spell check in my project.  Thanks much!

----------


## stru4nak

I add reference i00spellchecker and i have this error in visual studio 2010 4.0 netframework  	

```
The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "i00SpellCheck" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project.	SpellCheck
```

----------


## i00

I have only used VS 2008, 2012 and 2013 ... but ... I am guessing that the project has re-targeted when it was upgraded to .Net framework 4

I would start by checking the projects framework target, if it has been updated you will probably need to remove the reference to System.Web and re-add the one that matches the version from the framework that you are targeting.

Kris

----------


## stru4nak

So i when i start program i need to make to be on net framework 3.5 not 4.

----------


## i00

Just re-targeting to framework 4.0 myself... in VS2013 though

Got it working here's what I did:

Run through the upgrade wizard that popped up when opening it in VS2013Set the target framework to 4.0 in *ALL* of the projects (I used 4.0 because A. That's what you have and B. Because a lot of people still run XP and it is the last version compatible with it!)Added a reference to System.Xaml in the i00SpellCheck projectHad no errors so ran it!

If you still have problems copy and paste the error list into here

Kris

----------


## i00

Just made the download link point to Code Project ... Frustrating having to update 2 articles each time.

Kris

----------


## ISPAmy

I intend to use this code in a project.

----------


## jhwilliams1985

I have been enjoying the i00 spell check, I have made my self a book program. Some of my books that I had made have many error's in spelling and I would like to see a popup window to manage all spelling error's instead of looking for all the underlined words.

I have Microsoft Office word, but I don't want to use that spell check because of my custom dictionary that was made for those books.
Each book has its own dictionary. 

The question that I have:

When you right click on the word that is underlined, and have a button to launch a master spell check window so you can click accept change's or deny change's for each word. Like a Do until loop or something?

----------


## blessed

Hi. I am using i00 spell check for my project. I have one question. How do you disable the spell check on a read-only textbox / datagridview column? I don't want the user to change anything if the control is read-only. Even if it's a misspelled word!

Thanks!

----------


## i00

> I have been enjoying the i00 spell check, I have made my self a book program. Some of my books that I had made have many error's in spelling and I would like to see a popup window to manage all spelling error's instead of looking for all the underlined words.
> 
> I have Microsoft Office word, but I don't want to use that spell check because of my custom dictionary that was made for those books.
> Each book has its own dictionary. 
> 
> The question that I have:
> 
> When you right click on the word that is underlined, and have a button to launch a master spell check window so you can click accept change's or deny change's for each word. Like a Do until loop or something?


Sorry about the delay ... you can press F7 ... or load it with code ... can't remember how to do this from memory (not near a computer I can check on), but there is an eg of this in my demo project.

Kris

----------


## i00

> Hi. I am using i00 spell check for my project. I have one question. How do you disable the spell check on a read-only textbox / datagridview column? I don't want the user to change anything if the control is read-only. Even if it's a misspelled word!
> 
> Thanks!


Hrm ... I have been meaning to fix this ... you have to disable it on a case by case basis atm through code... will hopefully have an update shortly.

Kris

----------


## Conrad

Nice! 
It would be better if you would make it easier to log in and post a reply like a simple "I am using i00 Spell check in my project"
 :Smilie:

----------


## cgonzalez

I am using your spell checker in my project. Thank you very much!!

----------


## donChan

I am using i00 Spell check in my project, it is very good.

----------


## theryan722

I am using i00 Spell check in my project, thank you!

----------


## Simancas80

I am using i00 Spell check in my project.

----------


## SkyCraw

I am using i00 Spell check in my project, thanks for this awesome standalone resource!

----------


## tazer281

I am using i00 Spell check in my project  :Smilie:

----------


## Joye

Is there any video could explain the steps one by one?
I'm really interested to get rid of word spellchecker from all my projects

----------


## i00

> Is there any video could explain the steps one by one?
> I'm really interested to get rid of word spellchecker from all my projects


No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.

Kris

----------


## Joye

> No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.
> 
> Kris


*
Thank you I just did*

----------


## Joye

> No there is not sorry, but if you PM me I am happy to organize personal correspondence with you to help you integrate the features that you specifically require into your project.
> 
> Kris


*Now I am using i00 Spell check in my project, thank you for this awesome standalone resource*  :Thumb:

----------


## i00

> *Now I am using i00 Spell check in my project, thank you for this awesome standalone resource*


Glad I could help  :Smilie: 
Kris

----------


## schoemr

Hey Kris,

Thank you for making this available as free to use. However I cannot make it to work  :Frown: 

I am sure you have read this many times, after publish when run setup this error: Reference in the manifest does not match the identity of the downloaded assembly i00BindingList.exe.

I have spend half day now try to find solution and I have try everything. Also some comments here "have to sign ClickOnce Manifest + ClickOnce Security Setting" and also other possible solutions like this

https://stackoverflow.com/questions/...does-not-match

I still get same error.

What I did was to add your project to mine and to reference your project in my project. So, I am not sure what is causing this error. Perhaps two exe's.. I don't know. 

So maybe I shall try other option to implement your spellchecker i.e.



> or you can bring all of *.vb files in the "SpellCheck\Spell Check" folder (from the zip) directly into your own project (VB.Net only)*
> NOTE: For the methods with the * you will need to also copy the dictionary files to the applications path


If I try this option do i have to get all *.vb files of all 18 projects in that solution from the zip? It is a lot..and for some other functionalities as well... I want to do spell check on datagridviews and textboxes only... 

Can you please tell me what to do?

Much appreciated

----------


## i00

> Hey Kris,
> 
> Thank you for making this available as free to use. However I cannot make it to work 
> 
> I am sure you have read this many times, after publish when run setup this error: Reference in the manifest does not match the identity of the downloaded assembly i00BindingList.exe.
> 
> I have spend half day now try to find solution and I have try everything. Also some comments here "have to sign ClickOnce Manifest + ClickOnce Security Setting" and also other possible solutions like this
> 
> https://stackoverflow.com/questions/...does-not-match
> ...


Not sure what's going on here schoemr, but have PM'ed you to investigate further.

...Also what you are doing with the project seems ok ... but I have asked you to elaborate a bit in the PM just in case.

Kris

----------


## Ran_TH

Hello i00, thank you for providing such useful project for the community!
I'd like to ask, is this compatible with VS2017? I tried to open the project, some forms are just unable to open.
Here's what the Designer view said:



> The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes in the file: SpellCheckDialog --- The base class 'i00SpellCheck.WindowAnimation' could not be loaded. Ensure the assembly has been referenced and that all projects have been built.


I'd like to implement only Spell Check dialogue for my project.
Thanks in advance!

----------


## toye

I am using i00 Spell check in my project.
Great work! Easy to implement and works exactly as described!

Randy Toye

----------


## Ran_TH

Hello...
So I have implemented it to my project, however I want to know one thing.. is there a way to disable the Window Animation?
Since Windows 7 already has animation when the window opens anyway so I want to disable this. Could anyone give a hint what should I change?

Thanks.

----------


## i00

> Hello...
> So I have implemented it to my project, however I want to know one thing.. is there a way to disable the Window Animation?
> Since Windows 7 already has animation when the window opens anyway so I want to disable this. Could anyone give a hint what should I change?
> 
> Thanks.


Open the forms designer and where it says inherits ... At the top.. change that to inherits windows.form

Kris

----------


## Ran_TH

> Open the forms designer and where it says inherits ... At the top.. change that to inherits windows.form
> 
> Kris


Thank you!
Btw say that I have collections of string that I would like to check...
These strings needs to be has specified index/keys.
Is there a way I could check all of them at once instead of per string? I don't want the user to click Close to confirm changes per string checked.

Or maybe at least how to make the spell check auto close by itself after spell check complete...I've been stepping through the codes but I don't find the lines for Close button...

----------


## David Kuchmar

Re: i00 .net spell check.....  WOW ... will i fumbled my way through it for 2 days before i could get it to work.  It is everything you said it was.  My minor suggestion is.... (and i apologise if i seem a little in experienced - it has been a while since detailed development)....  your instructions on getting to use it - need a few more words to make things obvious - and some of the instructions are not quite perfect - such as the imports statement.  It took me two days to work out how to add the dictionary files - which solved my problem.  Looking through your threads... others have had this problem also.  In any case, i repeat, it is fabulous!  Thank you!!!

----------


## Zifster

I am using i00 Spell Check in my project.

Thanks so much for this component!

----------


## i00

> Thank you!
> Btw say that I have collections of string that I would like to check...
> These strings needs to be has specified index/keys.
> Is there a way I could check all of them at once instead of per string? I don't want the user to click Close to confirm changes per string checked.
> 
> Or maybe at least how to make the spell check auto close by itself after spell check complete...I've been stepping through the codes but I don't find the lines for Close button...


What do you mean all at once?? ...
Just loop through the words in your collection and check each word ... to the user it will look like this is all at once.. There is an example on how to check a single word in the menu on the demo project.

Kris

----------


## i00

> It is everything you said it was.


Thanks  :Smilie: 




> My minor suggestion is.... (and i apologise if i seem a little in experienced - it has been a while since detailed development)....  your instructions on getting to use it - need a few more words to make things obvious - and some of the instructions are not quite perfect - such as the imports statement.  It took me two days to work out how to add the dictionary files - which solved my problem.  Looking through your threads... others have had this problem also.  In any case, i repeat, it is fabulous!  Thank you!!!


Yea sorry about the instructions .. They are a little out of date and also were originally written for VS2008 ...

https://www.codeproject.com/Articles...nents-Required prob has more up to date instructions  :Smilie: .

Kris

----------


## Signalman

When I attempt ot run the appication code supplied. I get an error that _Microsoft.Office.Interop.Word.Application_ is not defined.  I have installed the office interop assembelies, and added in the reference to _Microsoft.Office.Interop.Word_ but the errror wont go away.  

Any Ideas



```
Public Class Word

    Friend Shared ReadOnly Property WordApp() As Microsoft.Office.Interop.Word.Application
        Get
            Static mc_WordApp As Microsoft.Office.Interop.Word.Application = Nothing
            If mc_WordApp Is Nothing Then
                mc_WordApp = New Microsoft.Office.Interop.Word.Application
                mc_WordApp.Documents.Add()
                AddHandler Application.ApplicationExit, AddressOf ApplicationExit
                mc_WordApp.DisplayAlerts = Microsoft.Office.Interop.Word.WdAlertLevel.wdAlertsAll
                'mc_WordApp.Visible = True
            End If
            Return mc_WordApp
        End Get
    End Property

    Private Shared Sub ApplicationExit(ByVal sender As Object, ByVal e As System.EventArgs)
        WordApp.Quit()
    End Sub
```



```
        Public Overrides Function SpellCheckSuggestionsInternal(ByVal Word As String) As System.Collections.Generic.List(Of i00SpellCheck.Dictionary.SpellCheckSuggestionInfo)
            Dim suggestions = WordApp.GetSpellingSuggestions(Word)
            SpellCheckSuggestionsInternal = New List(Of i00SpellCheck.Dictionary.SpellCheckSuggestionInfo)
            Dim closeness As Integer
            For Each suggestion In suggestions.OfType(Of Microsoft.Office.Interop.Word.SpellingSuggestion)()
                SpellCheckSuggestionsInternal.Add(New i00SpellCheck.Dictionary.SpellCheckSuggestionInfo(closeness, suggestion.Name))
                closeness -= 1
            Next
        End Function
```

----------


## i00

> When I attempt ot run the appication code supplied. I get an error that _Microsoft.Office.Interop.Word.Application_ is not defined.  I have installed the office interop assembelies, and added in the reference to _Microsoft.Office.Interop.Word_ but the errror wont go away.  
> 
> Any Ideas
> 
> 
> 
> ```
> Public Class Word
> 
> ...


That is just for the Word plugin ... to demonstrate that it can work with other spelling engines ... you can just unload the project... unless you really want to use word .. which I would NOT advise.

Kris

----------


## FHoelgaard

I am using i00 Spell check in my project...

----------


## T0PGun

Hi Guys

Please i need some help. I download i00 Spellchecker from one of the other sites, and built it into my program. At first, it was working fine. But then I added in Crystal Reports, so we had to upgrade the .NET Framework to 4.7. After doing this, some machines are still working fine, when others get the following error:


```
System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
```

Then, on other machines, we don't get an error, but rather the whole window resizes, as shown below:
Before right clicking:


And after right clicking for spellcheck


I am lost, and don't know what to do, please can someone help me.

Thanks
T0PGun

----------


## T0PGun

Hi Everyone,

Please I urgently need help on this. Is there anyone that can help me. I need to get this problem resolved today if possible.

Thanks
T0PGun

----------


## i00

> Hi Everyone,
> 
> Please I urgently need help on this. Is there anyone that can help me. I need to get this problem resolved today if possible.
> 
> Thanks
> T0PGun


Hrm... I though I had released the fix for that version... the reason that the resizing is happening is because of the DPI... when a WinForms app loads WPF references this happens..
I used WPF to create a blur effect that is used for tool tip shadows.. to get around it look for GausianBlur.vb and change the GausianBlur method to:


VB.Net Code:
Public Sub GausianBlur(Optional ByVal Amount As Integer = 4)    OnFilterStarted()     OnFilterFinished()End Sub End Class

... as for the other error do you have any more details... eg when does this happen? ... the call stack does not seem to include any of my lines.. is this the full stack?

Also I use this with 4.7 with no issues (a few modifications since the last release though)

Kris

----------


## T0PGun

> Hrm... I though I had released the fix for that version... the reason that the resizing is happening is because of the DPI... when a WinForms app loads WPF references this happens..
> I used WPF to create a blur effect that is used for tool tip shadows.. to get around it look for GausianBlur.vb and change the GausianBlur method to:
> 
> 
> VB.Net Code:
> Public Sub GausianBlur(Optional ByVal Amount As Integer = 4)
    OnFilterStarted()
     OnFilterFinished()
End Sub
 End Class
> 
> ... as for the other error do you have any more details... eg when does this happen? ... the call stack does not seem to include any of my lines.. is this the full stack?
> 
> ...


Hi i00

Your suggestion worked, and my customer's screen is no longer zooming. Thank you so much, I appreciate it. As for the error, that is all it gave me, however, I have noticed that since I upgraded my IDE to version 15.8.7 the error has not appeared.

Thank you so much again i00, you don't know how much i really appreciate this, as I think your spellchecker is great.

Regards
T0PGun

----------


## loganh

Hello community and i00,

I've seen so many people using this project you have made and it sounds great. I'm having a hard time understanding the directions to add it to an existing vb form. Would it be possible for yourself or anyone in the community to help make a video showing how to use the program? I know it would help a lot as I'm not very code savy but I'm a very good repeater so either visual steps or detailed steps would be best for someone like myself. I"m using Visual Studio 2017 and on a vb solution. Thank you! Also once I get it working I am using i00 Spell check in my project!

----------


## i00

> Hello community and i00,
> 
> I've seen so many people using this project you have made and it sounds great. I'm having a hard time understanding the directions to add it to an existing vb form. Would it be possible for yourself or anyone in the community to help make a video showing how to use the program? I know it would help a lot as I'm not very code savy but I'm a very good repeater so either visual steps or detailed steps would be best for someone like myself. I"m using Visual Studio 2017 and on a vb solution. Thank you! Also once I get it working I am using i00 Spell check in my project!


The easiest way is to run the demo project then take the i00SpellCheck.dll from the folder and reference it in your project...
Then just put Imports i00SpellCheck at the very top of your forms code
Then call Me.EnableSpellCheck() on your Form.Load

----------


## loganh

> The easiest way is to run the demo project then take the i00SpellCheck.dll from the folder and reference it in your project...
> Then just put Imports i00SpellCheck at the very top of your forms code
> Then call Me.EnableSpellCheck() on your Form.Load


Hey, i00 thanks for the fast reply. I've tried to pull up a test visual studio file but it has tons of errors. To save on time sake is it possible to get that i00SpellCheck.dll messages to me from this site? It sounds like I just need that 1 single file from someone like yourself (the creator) and I can just reference it to my project I'm using? Let me know what you think I can attach a screenshot of the errors if you feel it would be better to tackle the list of errors I'm getting. (I know one of the errors refers to the office but I have office installed the latest version). Let me know what you think?

https://imgur.com/a/q9X7PVH

----------


## T0PGun

HI i00

Last time you assisted me where the screen was resizing, which seemed to work. Unfortunately, I have run into instances where it is no longer working, even on .NET framework 4.7.2. So far all the machines i have found it on seems to be machines with a high resolution, but yet they have a zoom factor on it. (E.G. 4k screens).

Please can you assist me in this again. If you like, I have access to one of these machines if you want to organise a look into it.

Thanks
T0PGun

----------


## i00

> HI i00
> 
> Last time you assisted me where the screen was resizing, which seemed to work. Unfortunately, I have run into instances where it is no longer working, even on .NET framework 4.7.2. So far all the machines i have found it on seems to be machines with a high resolution, but yet they have a zoom factor on it. (E.G. 4k screens).
> 
> Please can you assist me in this again. If you like, I have access to one of these machines if you want to organise a look into it.
> 
> Thanks
> T0PGun


Can you tell me what the symptoms are?

Thanks,
Kris

----------


## T0PGun

While, if I take this piece of code:


```
If InStr(SCRUD, "C") > 0 Then
            Startup.RB_New.Enabled = True
            Startup.RB_Copy.Enabled = True
            Startup.RB_Reports.Enabled = True
            If TB_OLID.Text = Nothing Then
                Startup.RB_Save.Enabled = True
                Startup.RB_REW_Copy.Enabled = Startup.RB_Save.Enabled
                Startup.RB_REW_Paste.Enabled = Startup.RB_Save.Enabled
                Startup.RB_Imports.Enabled = True
                TB_LID.ReadOnly = False
                TB_LID.EnableSpellCheck
                DirectCast(TB_LID.SpellCheck, SpellCheckTextBox).RenderCompatibility = True
                TB_Desc.ReadOnly = False
                TB_Desc.EnableSpellCheck
                DirectCast(TB_Desc.SpellCheck, SpellCheckTextBox).RenderCompatibility = True
                CTB_PLID.Enabled = True
                CTB_LT.Enabled = True
                MTB_Qty.ReadOnly = False
                CB_Doc.Enabled = True
                If Not IsNothing(CB_Status) Then If CB_Status.Text = "No Analysis" Then CB_Status.Enabled = False Else CB_Status.Enabled = True
            End If
        End If
```

Now, if i comment out the "TB_LID.EnableSpellCheck" and the "TB_Desc.EnableSpellCheck" the application works fine but without the spell checker of cause. But then I enable it, it does exactly the same thing as the images i posted on Oct 10, 2018.

----------


## T0PGun

> Can you tell me what the symptoms are?
> 
> Thanks,
> Kris


Hi Kris,

Any luck?

Thanks
Brad

----------


## i00

> Hi Kris,
> 
> Any luck?
> 
> Thanks
> Brad


This is an issue with WPF stuff in WinForms...
The only thing that I used it with was the Image Filter...
Try removing all references to:
PresentationCore, PresentationFramework, and WindowsBase
... and see what it complains about.

Regards,
Kris

----------


## T0PGun

> This is an issue with WPF stuff in WinForms...
> The only thing that I used it with was the Image Filter...
> Try removing all references to:
> PresentationCore, PresentationFramework, and WindowsBase
> ... and see what it complains about.
> 
> Regards,
> Kris


Hi Kris, 

I removed the references and got 224 errors:

Severity
Code
Description
Project
File
Line
Suppression State

Error
BC30002
Type 'DoubleAnimation' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
57
Active

Error
BC30002
Type 'FrameworkElement' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
58
Active

Error
BC30002
Type 'DependencyProperty' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
58
Active

Error
BC30002
Type 'Storyboard' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
215
Active

Error
BC30002
Type 'Window' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
217
Active

Error
BC30002
Type 'DoubleAnimation' is not defined.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
219
Active

Error
BC30590
Event 'Completed' cannot be found.
i00SpellCheck
D:\###\i00 SpellCheck\i00SpellCheck\Misc\Window Animation\WindowAnimation.vb
229
Active

Error
BC30002
Type 'i00SpellCheck.SpellCheckControlBase' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
21
Active

Error
BC30002
Type 'iTestHarness' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
22
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
27
Active

Error
BC30284
property 'ControlTypes' cannot be declared 'Overrides' because it does not override a property in a base class.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
38
Active

Error
BC30590
Event 'SettingsChanged' cannot be found.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
51
Active

Error
BC30284
property 'Control' cannot be declared 'Overrides' because it does not override a property in a base class.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
81
Active

Error
BC30002
Type 'Menu.AddSpellItemsToMenu' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
96
Active

Error
BC30002
Type 'i00SpellCheck.Menu.AddSpellItemsToMenu.SpellItemEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
115
Active

Error
BC30590
Event 'WordAdded' cannot be found.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
115
Active

Error
BC30002
Type 'i00SpellCheck.Menu.AddSpellItemsToMenu.SpellItemEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
123
Active

Error
BC30590
Event 'WordChanged' cannot be found.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
123
Active

Error
BC30002
Type 'i00SpellCheck.Menu.AddSpellItemsToMenu.SpellItemEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
129
Active

Error
BC30590
Event 'WordIgnored' cannot be found.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
129
Active

Error
BC30002
Type 'i00SpellCheck.Menu.AddSpellItemsToMenu.SpellItemEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
137
Active

Error
BC30590
Event 'WordRemoved' cannot be found.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
137
Active

Error
BC30002
Type 'i00SpellCheck.SpellCheckControlBase.SpellCheckCustomPaintEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
156
Active

Error
BC31029
Method 'ErrorStyle_SpellCheckErrorPaint' cannot handle event 'SpellCheckErrorPaint' because they do not have a compatible signature.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
156
Active

Error
BC31029
Method 'ErrorStyle_SpellCheckErrorPaint' cannot handle event 'SpellCheckErrorPaint' because they do not have a compatible signature.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
156
Active

Error
BC31029
Method 'ErrorStyle_SpellCheckErrorPaint' cannot handle event 'SpellCheckErrorPaint' because they do not have a compatible signature.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
156
Active

Error
BC30002
Type 'SpellCheckCustomPaintEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
192
Active

Error
BC30002
Type 'SpellCheckCustomPaintEventArgs' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
193
Active

Error
BC32042
Too few type arguments to 'Dictionary(Of TKey, TValue)'.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
197
Active

Error
BC30284
sub 'RepaintControl' cannot be declared 'Overrides' because it does not override a sub in a base class.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
229
Active

Error
BC30002
Type 'i00SpellCheck.iTestHarness' is not defined.
FastColoredTextBoxPlugin
D:\###\i00 SpellCheck\Plugins\3rd Party\FastColoredTextBoxPlugin\SpellCheckFastColoredTextBox.vb
462
Active

Error
BC30002
Type 'ControlExtension' is not defined.
KonamiCode
D:\###\i00 SpellCheck\Plugins\KonamiCode\KonamiCode.vb
23
Active

Error
BC30002
Type 'iTestHarness' is not defined.
KonamiCode
D:\###\i00 SpellCheck\Plugins\KonamiCode\KonamiCode.vb
24
Active

Error
BC30284
property 'ControlTypes' cannot be declared 'Overrides' because it does not override a property in a base class.
KonamiCode
D:\###\i00 SpellCheck\Plugins\KonamiCode\KonamiCode.vb
34
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
KonamiCode
D:\###\i00 SpellCheck\Plugins\KonamiCode\KonamiCode.vb
44
Active

Error
BC30002
Type 'i00SpellCheck.iTestHarness' is not defined.
KonamiCode
D:\###\i00 SpellCheck\Plugins\KonamiCode\KonamiCode.vb
368
Active

Error
BC30002
Type 'i00SpellCheck.SpellCheckControlBase' is not defined.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
20
Active

Error
BC30002
Type 'iTestHarness' is not defined.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
21
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
28
Active

Error
BC30284
property 'ControlTypes' cannot be declared 'Overrides' because it does not override a property in a base class.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
50
Active

Error
BC30590
Event 'SettingsChanged' cannot be found.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
57
Active

Error
BC30284
property 'Control' cannot be declared 'Overrides' because it does not override a property in a base class.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
69
Active

Error
BC30284
sub 'RepaintControl' cannot be declared 'Overrides' because it does not override a sub in a base class.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
86
Active

Error
BC30002
Type 'i00SpellCheck.iTestHarness' is not defined.
LabelPlugin
D:\###\i00 SpellCheck\Plugins\LabelPlugin\SpellCheckLabel.vb
237
Active

Error
BC30002
Type 'i00SpellCheck.BufferedPanel' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\clsGrid.vb
19
Active

Error
BC30002
Type 'i00SpellCheck.HTMLToolTip.ToolTipPopup' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\clsGrid.vb
74
Active

Error
BC30590
Event 'Paint' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\clsGrid.vb
316
Active

Error
BC30002
Type 'i00SpellCheck.WindowAnimation' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
3
Active

Error
BC30284
sub 'Dispose' cannot be declared 'Overrides' because it does not override a sub in a base class.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
7
Active

Error
BC30002
Type 'i00SpellCheck.tsiColorPicker' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
180
Active

Error
BC30002
Type 'i00SpellCheck.MenuTextSeperator' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
182
Active

Error
BC30002
Type 'i00SpellCheck.MenuTextSeperator' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
183
Active

Error
BC30002
Type 'i00SpellCheck.tsiColorPicker' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.Designer.vb
184
Active

Error
BC30590
Event 'Load' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
124
Active

Error
BC30590
Event 'Disposed' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
219
Active

Error
BC30590
Event 'ColorChanged' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
266
Active

Error
BC30590
Event 'ColorChanged' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
270
Active

Error
BC30002
Type 'i00SpellCheck.MenuTextSeperator' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
489
Active

Error
BC30002
Type 'i00SpellCheck.HTMLMenuItem' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
504
Active

Error
BC30002
Type 'i00SpellCheck.tsiColorPicker' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
571
Active

Error
BC30002
Type 'i00SpellCheck.tsiColorPicker' is not defined.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
572
Active

Error
BC30590
Event 'ColorChanged' cannot be found.
PrefMon
D:\###\i00 SpellCheck\Components\PrefMon\frmPerformanceMonitor.vb
582
Active

Error
BC30002
Type 'i00SpellCheck.PluginWeight' is not defined.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
22
Active

Error
BC30002
Type 'ControlExtension' is not defined.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
24
Active

Error
BC30002
Type 'iTestHarness' is not defined.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
25
Active

Error
BC30002
Type 'extTextBoxContextMenu' is not defined.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
33
Active

Error
BC30284
property 'ControlTypes' cannot be declared 'Overrides' because it does not override a property in a base class.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
39
Active

Error
BC30284
property 'RequiredExtensions' cannot be declared 'Overrides' because it does not override a property in a base class.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
45
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
56
Active

Error
BC30590
Event 'MenuOpening' cannot be found.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
146
Active

Error
BC30002
Type 'i00SpellCheck.iTestHarness' is not defined.
TextBoxPrinter
D:\###\i00 SpellCheck\Plugins\TextBoxPrinter\TextBoxPrinter.vb
344
Active

Error
BC30002
Type 'i00SpellCheck.HTMLToolTip' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
54
Active

Error
BC30002
Type 'i00SpellCheck.HTMLToolTip.TipClickEventArgs' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
177
Active

Error
BC30590
Event 'TipClick' cannot be found.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
177
Active

Error
BC30590
Event 'TipClosed' cannot be found.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
181
Active

Error
BC30002
Type 'i00SpellCheck.MenuTextSeperator' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
277
Active

Error
BC30002
Type 'i00SpellCheck.HTMLMenuItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
279
Active

Error
BC30002
Type 'i00SpellCheck.extTextBoxContextMenu.StandardContextMenuStrip.StandardToolStripMenuItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
281
Active

Error
BC30002
Type 'i00SpellCheck.extTextBoxContextMenu.StandardContextMenuStrip.StandardToolStripMenuItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\SpeechEngineHelper.vb
492
Active

Error
BC30002
Type 'i00SpellCheck.PluginWeight' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
22
Active

Error
BC30002
Type 'i00SpellCheck.ControlExtension' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
24
Active

Error
BC30002
Type 'iTestHarness' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
25
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
30
Active

Error
BC30284
property 'RequiredExtensions' cannot be declared 'Overrides' because it does not override a property in a base class.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
42
Active

Error
BC30284
property 'ControlTypes' cannot be declared 'Overrides' because it does not override a property in a base class.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
49
Active

Error
BC30002
Type 'extTextBoxContextMenu' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
61
Active

Error
BC30002
Type 'i00SpellCheck.iTestHarness' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
149
Active

Error
BC30002
Type 'i00SpellCheck.extTextBoxContextMenu.StandardContextMenuStrip.StandardToolStripItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
255
Active

Error
BC30002
Type 'i00SpellCheck.HTMLMenuItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
259
Active

Error
BC30002
Type 'i00SpellCheck.extTextBoxContextMenu.StandardContextMenuStrip.StandardToolStripItem' is not defined.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
260
Active

Error
BC30590
Event 'MenuOpening' cannot be found.
TextBoxSpeechRecognition
D:\###\i00 SpellCheck\Plugins\TextBoxSpeechRecognition\TextBoxSpeechRecognition.vb
267
Active

Error
BC30002
Type 'i00SpellCheck.PluginWeight' is not defined.
TextBoxTranslator
D:\###\i00 SpellCheck\Plugins\TextBoxTranslator\TextBoxTranslator.vb
22
Active

Error
BC30002
Type 'i00SpellCheck.ControlExtension' is not defined.
TextBoxTranslator
D:\###\i00 SpellCheck\Plugins\TextBoxTranslator\TextBoxTranslator.vb
24
Active

Error
BC30002
Type 'iTestHarness' is not defined.
TextBoxTranslator
D:\###\i00 SpellCheck\Plugins\TextBoxTranslator\TextBoxTranslator.vb
25
Active

Error
BC30284
sub 'Load' cannot be declared 'Overrides' because it does not override a sub in a base class.
TextBoxTranslator
D:\###\i00 SpellCheck\Plugins\TextBoxTranslator\TextBoxTranslator.vb
30
Active

Error
BC30284
property 'RequiredExtensions' cannot be declared 'Overrides' because it does not override a property in a base class.
TextBoxTranslator
D:\###\i00 SpellCheck\Plugins\TextBoxTranslator\TextBoxTranslator.vb
122
Active

Error...

----------


## i00

> Hi Kris, 
> 
> I removed the references and got 224 errors:


The only relevant errors here are probably the WindowAnimation ones ... because i00SpellCheck failed to build it complains about everything that uses i00SpellCheck aswell ... I HATE THIS ... doesn't show the cascaded errors, either does the MSBuild command...
anyway...
Remove i00SpellCheck\Misc\Window Animation\WindowAnimation.vb..

There will be some errors about WindowAnimation ... replace the Inherits WindowAnimation lines with Inherits System.Windows.Form
Search for: 'remove the opening animation
... and delete that comment + the two following If statements...

Then you should be right to go.

Kris

----------


## T0PGun

> The only relevant errors here are probably the WindowAnimation ones ... because i00SpellCheck failed to build it complains about everything that uses i00SpellCheck aswell ... I HATE THIS ... doesn't show the cascaded errors, either does the MSBuild command...
> anyway...
> Remove i00SpellCheck\Misc\Window Animation\WindowAnimation.vb..
> 
> There will be some errors about WindowAnimation ... replace the Inherits WindowAnimation lines with Inherits System.Windows.Form
> Search for: 'remove the opening animation
> ... and delete that comment + the two following If statements...
> 
> Then you should be right to go.
> ...


Hi Kris

Deleting the WindowAnimation and all vb code under it got rid of most of the errors.
Unfortunatly, I am still sitting with one error. This is as follows:

Severity
Code
Description
Project
Path
File
Line
Suppression State

Error
BC30002
Type 'System.Windows.Media.Effects.Effect' is not defined.
i00SpellCheck
D:\...\i00SpellCheck\Misc\Image Filters\Filters
D:\...\i00SpellCheck\Misc\Image Filters\Filters\ApplyWPFEffect.vb
15
Active

----------


## i00

> Hi Kris
> 
> Deleting the WindowAnimation and all vb code under it got rid of most of the errors.
> Unfortunatly, I am still sitting with one error. This is as follows:
> 
> Severity
> Code
> Description
> Project
> ...


Just delete the file altogether ...
It should not be referenced since you removed the content of the blur filter  :Smilie: 

Kris

----------


## T0PGun

> Just delete the file altogether ...
> It should not be referenced since you removed the content of the blur filter 
> 
> Kris


Hi Kris, I deleted it, and found some additional code that referred to the windows animation, so I commentted it out to. I then successfully rebuilt the DLL and reapplied it to my project. Afterwards, i recompiled my project and ran it, and started testing it, only to have it still doing the exact same thing.

Any other ideas?

Thanks
Brad

----------


## T0PGun

> Hi Kris, I deleted it, and found some additional code that referred to the windows animation, so I commentted it out to. I then successfully rebuilt the DLL and reapplied it to my project. Afterwards, i recompiled my project and ran it, and started testing it, only to have it still doing the exact same thing.
> 
> Any other ideas?
> 
> Thanks
> Brad


Hi Kris

Any other ideas, I really need to get to the bottom of this as it is irritating users.

Thanks in advance
Brad

----------


## i00

> Hi Kris
> 
> Any other ideas, I really need to get to the bottom of this as it is irritating users.
> 
> Thanks in advance
> Brad


The only thing that alters the DPI is the use of WPF in Winforms... if you have removed all references to WPF in everything and fixed the errors that I have pointed out this should work.

I use (a customized version) of this library across ~240 computers in our organization without issue.. about 25% have non-standard DPIs.

Kris

----------


## maczoon

I am using i00 Spell check in my project

----------


## wakgtech

Just came across this program. Cool. I have it loaded into my project and I can call up the dialog box, but I am unsure how to call the menu. that is what I really need. something that will notify the user that a word is misspelled, and they can correct by right clicking. I see it in your screen shots so I know it is possible , but I am struggling with how to do it.

----------


## Truth

Thank you Kris(i00), for your wonderful library. I have incorporated it into my soon to be commercial work (For now free), it is  called Manuscribe,  Manuscript editor for Authors, who would want to publish their books (like Scrivener). Any one interested can download and use. 
Thanks again 
Link to download Download Manuscribe 0.3

----------


## kcsignlangguy

I am using i00SpellCheck in my projects. Love it!

----------


## i00

> I see it in your screen shots so I know it is possible , but I am struggling with how to do it.


Sorry about the delay, will try to be more active on here :P..

How exactly are you trying to notify the user, do you mean the red underlines?

----------


## i00

> Thank you Kris(i00), for your wonderful library. I have incorporated it into my soon to be commercial work (For now free), it is  called Manuscribe,  Manuscript editor for Authors, who would want to publish their books (like Scrivener). Any one interested can download and use. 
> Thanks again 
> Link to download Download Manuscribe 0.3


Cool, also cheers for the credit on your page  :Wink: 

is that a rich text control in your screenshot?
I ask because unfortunately there is no good way to draw over the control.
Also you state "it might slow down or flicker your document", it shouldn't flicker unless you have RenderCompatibility = True... do you need that?
Also I am waiting for https://github.com/Klegy/CSharpWriter to be more complete (support tables), then I plan on making a plugin for that which should allow fast flicker free drawing  :Smilie: .

----------


## peterc67

I am using i00 Spell check in my project

----------


## Truth

Does this source exist any where, please help. The CodeProject link goes to the authors website, which nolonger exists

----------


## Delaney

deleted

----------


## sridharavijay

> deleted


I needed this desperately!  :Frown:

----------


## Peter Porter

> Does this source exist any where, please help. The CodeProject link goes to the authors website, which nolonger exists


You used it back in 2020. What happened to your copy?

Anyway, the Wayback machine archived i00's project back in 2014. Here-ya go!

https://web.archive.org/web/20210918...k_20140111.zip

i00 might have updated it since then. Ask him.

----------


## sridharavijay

> You used it back in 2020. What happened to your copy?
> 
> Anyway, the Wayback machine archived i00's project back in 2014. Here-ya go!
> 
> https://web.archive.org/web/20210918...k_20140111.zip
> 
> i00 might have updated it since then. Ask him.


Great thank you.. yes I used... unfortunately I have binaries everywhere, lost the source... thanks for it

----------

