Link to home
Start Free TrialLog in
Avatar of RobertoFreemano
RobertoFreemanoFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Spell check WebBrowser1 to RTB VB.NET)

Hi Experts,

I'm trying to add a spell checker to my wordprocessor app. This is the final part to my project. A bit tricky... well, for me at least.

I have a Winform with a RichTextBox & a WebBrowser and a ToolStrip with Buttons. I want to click ToolStripButton1 and it hides RTB and shows WebBrowser1, whilst selecting all RTB text and copying to clipboard... (please tell me if this is a dumb way to spellcheck)

Private Sub ToolStripButton1_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton1.Click
        WebBrowser1.Navigate(New Uri("http://www.jspell.com/public-spell-checker.html"))
        RichTextBox1.SelectAll()
        RichTextBox1.Copy()
        RichTextBox1.SendToBack()
       End Sub

Open in new window

WebBrowser1 then shows 'jspell.com' URL ... you then have to paste (manually) into their multiline textbox... click "SPELL CHECK"...
ToolStripButton2 I want to try capturing the corrected spelling from the online textbox and paste it back into RTB (replacing) all text. (Ideally, if this could all be done off one button action, would be better!!!!).
Private Sub ToolStripButton2_Click(sender As System.Object, e As System.EventArgs) Handles ToolStripButton2.Click
        Dim myText As String = Me.WebBrowser1.Document.Body.InnerText
        RichTextBox1.Text = myText
        WebBrowser1.SendToBack()
    End Sub

Open in new window

But the result appears as...
Free Online Spell Checker

Spell check English, French, Spanish, Italian or German. A medical spell checker is also included. Simply PASTE your text below, CLICK 'Spell Check' and COPY the corrected text back into your application...

I thought about possibly trying to detect 'Open Office' and if installed... open that spell checker... but I don't know how to do this either :(

can an Expert please help ;)
Thanks,
Roberto
Avatar of Member_2_861731
Member_2_861731
Flag of Canada image

Have you checked this?

http://www.codeproject.com/Articles/5277/NetSpell-Spell-Checker-for-NET

Does that work for you?
Avatar of RobertoFreemano

ASKER

Hi LIONKING,

Thanks for your input... Sadly, I'm on Vista :(
NetSpell.MSI is asking me to install .net 1.1 but Vista don't like it.
I'll have to setup an XP Virtal Machine to test this...
I want to future proof this app, so it works on XP,Vista,Win7...
Hi LIONKING,

I setup my gen-xp vm and installed all the bells 'n' whistles... and I got an error after installing NetSpell... clicked OK... navigated to the demo folder on c:\Program Files\NetSpell\demo\Demo.Web.VBnet... but get a window (popup) with
<%0 Page Lang... etc....

Open in new window

Sorry for theh delay.

Did you try downloading the source code that's available on the website?
ASKER CERTIFIED SOLUTION
Avatar of Member_2_861731
Member_2_861731
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Wow thanks LIONKING... this looks promising... ;)
Thanks LIONKING ;)