Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Performance Issue
posted

Using NetAdvantage for .net 2007 Volume 1 CLR 2.0 with the latest hotfix applied.

I have a user control with the winspellchecker added to spell check a text box. The spell checking works just fine but my applications memory footprint has grown by aprx. 250 megs!  Without the spell checker the footprint is around 90 megs with the spell checker added it grows to 350 megs.  What am I missing? Please help.

 

Ok, I think I have solved my problem. Instead of adding the spell checker to my user control (the user control is being used in many different locations in the application), I should've had the user control implement the IProvideTextBox interface and add the winspell checker to the main form....

Confused

 

  • 160
    posted

    I now have another issue with the winspellchecker.

    My design is as follows:

    I have a user control that contains a textbox, the user control implements the IProviderTexBox by returning a reference to the text box. The user control and a winspellchecker are added to a winform. Spell checking works just fine when using the dialog from, but I would also like to provide a context menu for the user.  I changed to modifier of the textbox contained in the user control to public and subscribed to its mouseDown event in the winform. In the mouseDonw event handler I'm doing the following:

    void userControlTextBox_MouseDown(objec sender, MouseEventArgs e)

    {

         this.lastClickedControl = sender;

         Point point = new Point(e.X, e.Y);

         this.lastClickeError = this.ultraSpellChecker.GetErrorAtPoint(this.lastClickedControl,point);

    }

    even though I'm clicking on a word that is spelled incorrectly and underlined with the red line ,the GetErrorAtPoint method always returns null.

    What am I missing?