基本上我使用NHunspell来检查拼写错误,我遇到了一个错误和问题。
错误在于,每当将 NHunspell 添加到文本框或富文本框时,它根本无法停靠到容器或在停靠时调整大小。它崩溃了。为了避免这个错误,我必须简单地锁定表单并禁用最大化按钮。这样用户就可以关闭程序并调整其大小。
错误:
`System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Int32 width, Int32 height, PixelFormat format)
at NHunspellExtender.NHunspellTextBoxExtender.CustomPaintTextBox.TextBoxBase_ClientSizeChanged(Object sender, EventArgs e)
at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
at System.Windows.Forms.Control.UpdateBounds()
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.RichTextBox.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)`
另一个问题是似乎存在性能问题。如果我要加载一个包含大约 500 多个字符的文件并且有相当多的错误,比如说 25,我尝试向下滚动页面,它会变得非常滞后。
我知道这很多,但我想知道是否有人一直在使用它找到解决方案,如果有人可以帮助我,那就太好了!
PS。仅当我使用 RichTextBoxes 时才会出现此问题。文本框很好。