首先建立新建了一个窗体baseForm作为父窗体:这个父窗体继承了CCSkinMain;
然后新建了一个子窗体fm_main继承baseForm。
现在设计fm_main时提示下图;
其他窗体都可以正常显示,就是这个不可以。
这个是baseForm的代码
[C#] 纯文本查看 复制代码
public partial class baseForm : CCWin.CCSkinMain
{
public baseForm()
{
InitializeComponent();
}
public baseForm(FormBorderStyle fbs)
{
this.FormBorderStyle = fbs;
InitializeComponent();
}
}
baseForm的InitializeComponent方法
[C#] 纯文本查看 复制代码 private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(myForm));
this.SuspendLayout();
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "";
this.BackColor = System.Drawing.Color.White;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
}
|