开发者

Pop-up Window was moved but its image still left behind

开发者 https://www.devze.com 2022-12-23 15:42 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号