I'm using VS 2005 and .NET framework 2.0 SP2 to build an application with a datagridview in it. I'm using Microsoft Word 11.0 Object Library to do the spelling ch开发者_StackOverflow社区ecker on one of the field in datagridview. When it detected a spelling and grammar window would pop-up open on top of the datagridview.
The problem I got was when I moved the pop-up window to the new location, there's still an image of the pop-up window left behind the previous location. The more I moved the more of those copied image would be created on screen.
How I can overcome this problem?
Thanks in advance, Andrew
This happens when your form stops painting itself.
You're probably making a blocking call to Word's spell-check, which prevents the form from receiving Windows messages and repainting.
To fix it, you'll need to call the Word function from a background thread.
精彩评论