我用的是skinEngine皮肤组件,
为什么当我把窗件的IsMdiContainer 设为 true时就报错.说:
未处理 System.NullReferenceException
  Message="未将对象引用设置到对象的实例。"
  Source="IrisSkin2"
  StackTrace:
       在 Sunisoft.IrisSkin.InternalControls.x3c41176af7e54b01.x9954cbb39675570d()
       在 Sunisoft.IrisSkin.InternalControls.x3c41176af7e54b01.set_MdiContainer(Form value)
       在 Sunisoft.IrisSkin.xa427f1b2281f554b.x30c11b5a89921b08()
       在 Sunisoft.IrisSkin.xa427f1b2281f554b..ctor(IntPtr handle, SkinEngine engine)
       在 Sunisoft.IrisSkin.SkinEngine.DoAddWnd(IntPtr handle, Boolean isManual)
       在 Sunisoft.IrisSkin.SkinEngine.FnHookProc(Int32 nCode, IntPtr wParam, IntPtr lParam)
       在 System.Windows.Forms.SafeNativeMethods.ShowWindow(HandleRef hWnd, Int32 nCmdShow)
       在 System.Windows.Forms.Control.SetVisibleCore(Boolean value)
       在 System.Windows.Forms.Form.SetVisibleCore(Boolean value)
       在 System.Windows.Forms.Control.set_Visible(Boolean value)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       在 System.Windows.Forms.Application.Run(Form mainForm)
       在 WindowsApplication1.Program.Main() 位置 E:\bb\WindowsApplication1\WindowsApplication1\Program.cs:行号 17
       在 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       在 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       在 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       在 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       在 System.Threading.ThreadHelper.ThreadStart()
那位大侠帮帮我啊......

解决方案 »

  1.   

    使用skinfeature界面换肤组件啊。 完全支持c#的。界面精致,而且效果很棒!!
    www.skinfeature.com
      

  2.   

    不知道你们解决这个问题没有,其实mdi窗体也是可以的,但是写法要注意,在初始化皮肤变量的时候不要写在窗体的load的方法中,写在这里就容易出错,什么时候要用这个变量的时候初始化那条语句写在那前边,先判断一下,没有初始化就初始化一下,希望能解决你的问题,也留着我以后自己看