欢迎加我的QQ群:193522571,一起来讨论、交流!

AutoCAD.Net/C#.Net QQ群:193522571 无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”

解决办法:

在设计器代码中把4.0自动加上去的代码注释掉就行了。

 //((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
  //((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();

按不同的版本进行条件编译

#if V2007
#else
((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
#endif

posted @ 2019-12-29 13:17  swtool  阅读(498)  评论(0编辑  收藏  举报
欢迎加我的QQ群:193522571,一起来讨论、交流!