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 :()
Kris
Printable View
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 :()
Kris
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
I am using i00 Spell check in my project
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
I am using i00 Spell check in my project
...and it's awesome!
if anyone tell me this spellchecker why not support right to left languages?
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.
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
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
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/
Thanks ... I will look into this in the future, as for now though all of my spare time is occupied by another project.
Kris
i00 working great, however I really wish there was a property or setting I could utalize to force ucase spelling check, any suggestions?
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. :)
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.
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
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.
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.
Sorry if this has already been asked: does this software come in C#? Will it ever?
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.
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, 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):
Code: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:
• File -> Save AllCode:<System.ComponentModel.Browsable(True), Editor(GetType(System.ComponentModel.Design.MultilineStringEditor), GetType(UITypeEditor))> _
• 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()
I am using i00 Spell check in my project.
I am using i00 Spell check in my project
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
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
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.
Found where the problem is :)
That was easy find + fix...
Change the function RemoveWordBreaks in i00SpellCheck > Spell Check > SpellCheck.vb to:
Will post this in an update in a few days too...Code: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
Kris
Brilliant, that seems to have fixed it! Thanks.
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:
KrisCode: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
The use of GoTo makes me cry, sorry ^_^
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
Posted version 20120608
Kris
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!
http://img9.imageshack.us/img9/7481/aaamp.jpg
Thanks
We are going to use i00 spell check in our project