-
i00 Spell Check and Control Extensions - No Third Party Components Required
http://www.codeproject.com/script/Aw...e-winner30.gif 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: http://i00productions.org/downloader...et:Spell Check
Downloads per day:
http://i00productions.org/downloader...400&height=100
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 :)
Users
Users have been moved to their own post since the post size had been reached
Click here for users
Screen Shots
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")
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 = True
TextBox1.SpellCheck.Settings.AllowIgnore = True
TextBox1.SpellCheck.Settings.AllowRemovals = True
TextBox1.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 file
Dim 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 If
End Sub
Even more examples are included in the Test projects included in the download :).
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 i00SpellCheck
- Make a class that inherits i00SpellCheck.SpellCheckControlBase
- Override the ControlType Property to return the type of control that you want your plugin to spell check
- Add 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:
http://img600.imageshack.us/img600/9...yerproblem.png
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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 instances
- Fixed 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 version
- Fixed 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 extensions
- Default dictionary load is now threadded even when just calling .SpellCheck
- Control extensions can now specify multiple ControlTypes
- Put the TextBoxBase change case feature into its own control extension
- Put the nicer TextBoxBase context menu into its own control extension
- Made the window animations smoother and more stable for F7 etc
- Control 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 speech
- Custom Karaoke rendering control added to test form
- Now uses the new, more generic, control extension rather than extending SpellCheckTextBox
- Speech 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 changes
- Added 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 window
- OpenOfficeHunspellDictionary
- Hunspell now has case error underlineing
- Added 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 counter
- Fixed 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 lot
- Fixed 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 boxes
- Changed 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 settings
- Fixed 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 stored
- Changed 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 checked
- Fixed 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 dictionary
- Updated the FlatFile dictionary editor to support the new user dictionary
- Added 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 Plugin
- Made 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 disabled
- Fixed 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 added
- Fixed 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 menu
- Fixed 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 char
- Fixed an error that would re-paint the textbox errors 2x
- Disabled Cut/Copy/Paste options in menu if not on an STA thread as this would error
20120102 - Happy New Year!
- Modified definitions to lookup from file dynamically rather than being loaded into memory to reduce RAM usage ~56MB saved!
- Changed settings so that all the spellcheck settings are in a single class
- Cleaned up the SpellCheckTextBox class and subclasses to make settings easily editable with a property grid
- Added property grid to the test project
- Added a dictionary editor
- Added a "bare-bones" test project to the solution, to make it simpler for users to see how easy it can be to use i00 .Net Spell Check in your projects!
- Changed the render method to eliminate redraw flicker, added a setting to revert to the old render method "RenderCompatibility"
20111202 - Now with dialog!
- Cleaned up some stuff ... moved HTML formated tooltip + HTML ToolStripItem into their own controls
- Made the Text ToolStripSeperator look and function better
- Made the right click menu items portable so that they can be added to any menu for other things - not so tightly bound to the text box
- 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 tip
- Tooltip for definitions is now owner draw so that it appears a little nicer
- Fixed 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 misspelled
- Made the context menu position itself a little better if near the bottom or right sides of a screen
- Fixed a bug where, if you press the context menu button on the keyboard multiple times, the menu would add multiple of the same corrections to the context menu
- Sped up loading of dictionary file
- Fixed a bug in the definition file - all adjectives and adverbs were mixed up (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 ~150ms
- Improved 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 optimizations
- Dictionary is now stored as a Flat File for portability
- Added owner draw support for spelling errors
- Added the ability to customize colors for highlighting misspelled words
- Added some examples of how to customize the appearance of the spell check
- Word definitions added for spelling suggestions ... so if you are unsure of the correct spelling out of the suggestions you can pick the correct one from the definition
- The right click menu in .Net comes up from the middle of a text box when pressing the context menu button on the keyboard - It has now been modified to pop-out from the carets location
- Cross word generator - plan to make solver later too!
- Support added for Rich Text Boxes
- Added Suggestion Lookup Example
20111011 - Some fun extras
- Added anagram lookup
- Added Scrabble helper
20111008 - Minor changes
- Fixed a bug where the text box underlines would not always draw initially until the textbox was scrolled or had some text changed,
- Cleaned up the interface to made it look more professional
20111006 - Initial Release
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
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
Quote:
Originally Posted by
kevininstructor
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
Quote:
Originally Posted by
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
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
i00
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
Code:
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
Code:
'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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
kevininstructor
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.
Code:
'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
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 :)
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
moti barski
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.
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Nice! Although, I would removed this line from the first post if I were you.
Quote:
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:
Quote:
entirely open source
That implies that people may use the project however they wish.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
Nightwalker83
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
This looks nifty I am downloading it in case I need something like this in the future, thanks ^.^
-
Re: i00 .Net Spell Check - No 3rd party components required!
Will post an update within the next 48 hours with an anagram lookup and scrabble helper:)
Kris
-
New version is out :)
Now with promised scrabble helper and anagram lookup :)
Things to do now:
- Boggle solver
- Crossword solver
- Definition lookup
- Spell check interface - current spell check only accessed through right click menus
- Auto correct based on some rules
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Ola, was just checking this quickly. Is there a way to add multiple dictionaries (languages) and switch between them?
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
Radjesh Klauke
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 :)
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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?
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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.
1) Not a custom user control, it extends standard text boxes, so you don't need to change all of your existing ones :)... 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 :). - That said however, if your project is open source, you will need to reference the spellcheck.exe rather than redistribute my source code.
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
I haven't tried this in VS2010, will do over the next few days and let you know
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
New version is out btw :) (was actually out yest, but was pushed for time to post here)
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Will start with this next week with VS2010 and let you know.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
Radjesh Klauke
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) :)
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
Users should realize that the custom dictionaries shouldn't be added in the Program Files folder, but in the "SpecialFolder...." due to writing permissions. ;)
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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. ;)
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
1) Good point, never noticed tihs :p 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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
Fixed this case problem in the update too!...
prob post later today or 2morrow :)
Also whats the *exact* problem with publishing?
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
New version is out :) 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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
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 :)
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Is there an ignore-list available?
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
Radjesh Klauke
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
Ok will do this in the next version ... is a good idea anyway :) ... check back in a few days (hopefully will have it done ... maybe a little delay because of Skyrim tho) :)
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
Radjesh Klauke
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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:
http://i39.tinypic.com/3524zl3.png
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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:
http://www.vbforums.com/images/ieimages/2011/11/1.png
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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.
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
I'm using .Net Speel Check..Thx!
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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.
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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
Do you have the dictionary files in the same path as your app?
Kris
-
Re: i00 .Net Spell Check - No 3rd party components required!
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).
-
Re: i00 .Net Spell Check - No 3rd party components required!
Quote:
Originally Posted by
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).
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
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)
-
Re: i00 .Net Spell Check - No 3rd party components required!
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.
-
Re: i00 .Net Spell Check - No 3rd party components required!
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 :)).
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
-
Re: i00 .Net Spell Check - No 3rd party components required!
New version is out with a spell check dialog :)
Kris
-
Re: 20111202 - i00 .Net Spell Check - Code Project prize winner!
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.