使用了FormDrag后,发现在SharpDevelop下会出现exception:
"System.InvalidOperationException: Cross-thread operation not valid: Control [your_control_name_here] accessed from a thread other than the thread it was created on"
google了一下,发现这应该是.net 2.0升级后的设定
可以在Form_Load的地方加入
Control.CheckForIllegalCrossThreadCalls = False
本文介绍了一种在使用FormDrag时遇到的跨线程操作异常问题,并提供了解决方案:通过设置Control.CheckForIllegalCrossThreadCalls为False来避免在.NET2.0环境中出现此类异常。
3万+





