Skip to content

Spell checker

priya

priya

Asked Apr 29, 2015, 11:19 PM EDT4 answers
Share
LinkedInX
I am using web browser control in c#.. i just want to use spell checker...I am added netspell dll for dis.. I don't know how to impliment spellchecker  in my code.. please give me solution...

4 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    The following code is a very simple implementation of the NetSpell library.

    Please find the Attatched file...

    /*---------------*/
    internal System.Windows.Forms.RichTextBox Document;

    internal NetSpell.SpellChecker.Spelling SpellChecker;

    // add event handlers
    this.SpellChecker.MisspelledWord +=
                    new NetSpell.SpellChecker.Spelling.MisspelledWordEventHandler(
                                                this.SpellChecker_MisspelledWord);

    this.SpellChecker.EndOfText +=
                         new NetSpell.SpellChecker.Spelling.EndOfTextEventHandler(
                                                     this.SpellChecker_EndOfText);

    this.SpellChecker.DoubledWord +=
                       new NetSpell.SpellChecker.Spelling.DoubledWordEventHandler(
                                                   this.SpellChecker_DoubledWord);

    private void SpellChecker_DoubledWord(object sender,
                                     NetSpell.SpellChecker.SpellingEventArgs args)
    {
        // update text
        this.Document.Text = this.SpellChecker.Text;
    }

    private void SpellChecker_EndOfText(object sender,
                                        System.EventArgs args)
    {
        // update text
        this.Document.Text = this.SpellChecker.Text;
    }

    private void SpellChecker_MisspelledWord(object sender,
                                     NetSpell.SpellChecker.SpellingEventArgs args)
    {
        // update text
        this.Document.Text = this.SpellChecker.Text;
    }

    // Start Spell Checking
    SpellChecker.Text = this.Document.Text;
    SpellChecker.SpellCheck();


    0
  • Gowtham Rajamanickam
    0
    internal System.Windows.Forms.RichTextBox Document; internal NetSpell.SpellChecker.Spelling SpellChecker; // add event handlers this.SpellChecker.MisspelledWord += new NetSpell.SpellChecker.Spelling.MisspelledWordEventHandler( this.SpellChecker_MisspelledWord); this.SpellChecker.EndOfText += new NetSpell.SpellChecker.Spelling.EndOfTextEventHandler( this.SpellChecker_EndOfText); this.SpellChecker.DoubledWord += new NetSpell.SpellChecker.Spelling.DoubledWordEventHandler( this.SpellChecker_DoubledWord); private void SpellChecker_DoubledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs args) { // update text this.Document.Text = this.SpellChecker.Text; } private void SpellChecker_EndOfText(object sender, System.EventArgs args) { // update text this.Document.Text = this.SpellChecker.Text; } private void SpellChecker_MisspelledWord(object sender, NetSpell.SpellChecker.SpellingEventArgs args) { // update text this.Document.Text = this.SpellChecker.Text; } // Start Spell Checking SpellChecker.Text = this.Document.Text; SpellChecker.SpellCheck();
    0
  • priya
    0
    I found error in spellchecker... this is field but used like a type...
    0
  • priya
    0
    I found error in spellchecker... this is field but used like a type...
    0