作者: kssbsr
查看: 1925|回复: 2
打印 上一主题 下一主题

MDI窗体的Bug

[复制链接]
跳转到指定楼层
楼主
kssbsr 发表于 2015-8-4 18:23:20 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
查看: 1925|回复: 2
本帖最后由 kssbsr 于 2015-8-4 18:24 编辑

Bug 在使用MDI窗体时发生了错误

主界面MDI内窗体正常显示,除了分割线那边的红点


错误还原:
[C#] 纯文本查看 复制代码
using System;
using System.Windows.Forms;
using CCWin;
using updater.MainLib;

namespace updater
{
    // public partial class Box : Form   // 这行代码不会报错
    public partial class Box : CCSkinMain
    {
        public Box()
        {
            InitializeComponent();
        }

        private void Box_Load(object sender, EventArgs e)
        {
            frmStartUp frmStartUp = new frmStartUp();
            frmStartUp.MdiParent = this;
            frmStartUp.Show();
            frmStartUp.WindowState = FormWindowState.Maximized;     // 如果注释掉这行,错误消失

            //Animate.Window(this.Handle, 100, Animate.AW_SLIDE | Animate.AW_VER_POSITIVE);  // 滑动显示窗体
        }
    }
}


注释掉第21行,错误消失,如图:


JIT给出的错误信息:


  1. [code]有关调用实时(JIT)调试而不是此对话框的详细信息,
  2. 请参见此消息的结尾。

  3. ************** 异常文本 **************
  4. System.ArgumentException: 矩形“{X=180,Y=0,Width=4,Height=0}”的宽度或高度不能等于零。
  5.    在 System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
  6.    在 CCWin.SkinControl.SkinSplitContainer.OnPaint(PaintEventArgs e)
  7.    在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
  8.    在 System.Windows.Forms.Control.OnPrint(PaintEventArgs e)
  9.    在 System.Windows.Forms.Control.WmPrintClient(Message& m)
  10.    在 System.Windows.Forms.Control.WndProc(Message& m)
  11.    在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  12.    在 System.Windows.Forms.SplitContainer.WndProc(Message& msg)
  13.    在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  14.    在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  15.    在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  16.    在 System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  17.    在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
  18.    在 System.Windows.Forms.Control.DefWndProc(Message& m)
  19.    在 System.Windows.Forms.Control.WndProc(Message& m)
  20.    在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  21.    在 System.Windows.Forms.SplitContainer.WndProc(Message& msg)
  22.    在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  23.    在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  24.    在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  25.    在 System.Windows.Forms.UnsafeNativeMethods.DefMDIChildProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  26.    在 System.Windows.Forms.Form.DefWndProc(Message& m)
  27.    在 CCWin.CCSkinMain.DefWndProc(Message& m)
  28.    在 System.Windows.Forms.Control.WndProc(Message& m)
  29.    在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
  30.    在 System.Windows.Forms.Form.WndProc(Message& m)
  31.    在 CCWin.CCSkinMain.WndProc(Message& m)
  32.    在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  33.    在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  34.    在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  35.    在 System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
  36.    在 System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
  37.    在 System.Windows.Forms.Control.DefWndProc(Message& m)
  38.    在 System.Windows.Forms.Control.WndProc(Message& m)
  39.    在 System.Windows.Forms.MdiClient.WndProc(Message& m)
  40.    在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
  41.    在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
  42.    在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

复制代码
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 转播转播
回复 论坛版权

使用道具 举报

沙发
 楼主| kssbsr 发表于 2015-8-4 18:24:17 | 只看该作者

  1. ************** 已加载的程序集 **************
  2. mscorlib
  3.     程序集版本:4.0.0.0
  4.     Win32 版本:4.6.81.0 built by: NETFXREL2
  5.     基本代码:file:///H:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
  6. ----------------------------------------
  7. Microsoft.VisualStudio.HostingProcess.Utilities
  8.     程序集版本:12.0.0.0
  9.     Win32 版本:12.0.21005.1
  10.     基本代码:file:///H:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities/12.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.dll
  11. ----------------------------------------
  12. System.Windows.Forms
  13.     程序集版本:4.0.0.0
  14.     Win32 版本:4.6.81.0 built by: NETFXREL2
  15.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
  16. ----------------------------------------
  17. System
  18.     程序集版本:4.0.0.0
  19.     Win32 版本:4.6.81.0 built by: NETFXREL2
  20.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
  21. ----------------------------------------
  22. System.Drawing
  23.     程序集版本:4.0.0.0
  24.     Win32 版本:4.6.81.0 built by: NETFXREL2
  25.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  26. ----------------------------------------
  27. Microsoft.VisualStudio.HostingProcess.Utilities.Sync
  28.     程序集版本:12.0.0.0
  29.     Win32 版本:12.0.21005.1
  30.     基本代码:file:///H:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.HostingProcess.Utilities.Sync/12.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.HostingProcess.Utilities.Sync.dll
  31. ----------------------------------------
  32. Microsoft.VisualStudio.Debugger.Runtime
  33.     程序集版本:12.0.0.0
  34.     Win32 版本:12.0.21005.1
  35.     基本代码:file:///H:/Windows/assembly/GAC_MSIL/Microsoft.VisualStudio.Debugger.Runtime/12.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Debugger.Runtime.dll
  36. ----------------------------------------
  37. vshost32
  38.     程序集版本:12.0.0.0
  39.     Win32 版本:12.0.30723.0
  40.     基本代码:file:///F:/Updater/Updater/bin/Debug/updater.vshost.exe
  41. ----------------------------------------
  42. Microsoft.VisualBasic
  43.     程序集版本:10.0.0.0
  44.     Win32 版本:14.6.81.0 built by: NETFXREL2
  45.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
  46. ----------------------------------------
  47. System.Core
  48.     程序集版本:4.0.0.0
  49.     Win32 版本:4.6.81.0 built by: NETFXREL2
  50.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
  51. ----------------------------------------
  52. System.Xml.Linq
  53.     程序集版本:4.0.0.0
  54.     Win32 版本:4.6.81.0 built by: NETFXREL2
  55.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll
  56. ----------------------------------------
  57. System.Data.DataSetExtensions
  58.     程序集版本:4.0.0.0
  59.     Win32 版本:4.6.81.0 built by: NETFXREL2
  60.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll
  61. ----------------------------------------
  62. Microsoft.CSharp
  63.     程序集版本:4.0.0.0
  64.     Win32 版本:4.6.81.0
  65.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
  66. ----------------------------------------
  67. System.Data
  68.     程序集版本:4.0.0.0
  69.     Win32 版本:4.6.81.0 built by: NETFXREL2
  70.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
  71. ----------------------------------------
  72. System.Deployment
  73.     程序集版本:4.0.0.0
  74.     Win32 版本:4.6.81.0 built by: NETFXREL2
  75.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
  76. ----------------------------------------
  77. System.Xml
  78.     程序集版本:4.0.0.0
  79.     Win32 版本:4.6.81.0 built by: NETFXREL2
  80.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
  81. ----------------------------------------
  82. mscorlib.resources
  83.     程序集版本:4.0.0.0
  84.     Win32 版本:4.6.81.0 built by: NETFXREL2
  85.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/mscorlib.resources.dll
  86. ----------------------------------------
  87. updater
  88.     程序集版本:1.3.0.3
  89.     Win32 版本:2.0.0.1
  90.     基本代码:file:///F:/Updater/Updater/bin/Debug/updater.EXE
  91. ----------------------------------------
  92. CSkin
  93.     程序集版本:15.3.10.1
  94.     Win32 版本:15.3.10.1
  95.     基本代码:file:///F:/Updater/Updater/bin/Debug/CSkin.DLL
  96. ----------------------------------------
  97. MainLib
  98.     程序集版本:1.3.0.3
  99.     Win32 版本:2.0.1.1
  100.     基本代码:file:///F:/Updater/Updater/bin/Debug/MainLib.DLL
  101. ----------------------------------------
  102. Microsoft.VisualBasic.PowerPacks
  103.     程序集版本:12.0.0.0
  104.     Win32 版本:12.0.21005.1
  105.     基本代码:file:///F:/Updater/Updater/bin/Debug/Microsoft.VisualBasic.PowerPacks.DLL
  106. ----------------------------------------
  107. System.Configuration
  108.     程序集版本:4.0.0.0
  109.     Win32 版本:4.6.81.0 built by: NETFXREL2
  110.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
  111. ----------------------------------------
  112. e65640c4-dedd-4158-b5c3-f16d2a4a52d0
  113.     程序集版本:1.0.0.0
  114.     Win32 版本:15.3.10.1
  115.     基本代码:file:///F:/Updater/Updater/bin/Debug/CSkin.dll
  116. ----------------------------------------
  117. Newtonsoft.Json
  118.     程序集版本:7.0.0.0
  119.     Win32 版本:7.0.1.18622
  120.     基本代码:file:///F:/Updater/Updater/bin/Debug/Newtonsoft.Json.DLL
  121. ----------------------------------------
  122. System.Numerics
  123.     程序集版本:4.0.0.0
  124.     Win32 版本:4.6.81.0 built by: NETFXREL2
  125.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
  126. ----------------------------------------
  127. System.Drawing.resources
  128.     程序集版本:4.0.0.0
  129.     Win32 版本:4.6.81.0 built by: NETFXREL2
  130.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing.resources/v4.0_4.0.0.0_zh-Hans_b03f5f7f11d50a3a/System.Drawing.resources.dll
  131. ----------------------------------------
  132. System.Windows.Forms.resources
  133.     程序集版本:4.0.0.0
  134.     Win32 版本:4.6.81.0 built by: NETFXREL2
  135.     基本代码:file:///H:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_zh-Hans_b77a5c561934e089/System.Windows.Forms.resources.dll
  136. ----------------------------------------

  137. ************** JIT 调试 **************
  138. 要启用实时(JIT)调试,
  139. 该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
  140. jitDebugging 值。
  141. 编译应用程序时还必须启用
  142. 调试。

  143. 例如:

  144. <configuration>
  145.     <system.windows.forms jitDebugging="true" />
  146. </configuration>

  147. 启用 JIT 调试后,任何未经处理的异常
  148. 都将被发送到在此计算机上注册的 JIT 调试器,
  149. 而不是由此对话框处理。
复制代码


板凳
乔克斯 发表于 2015-8-5 13:49:16 | 只看该作者
加入MDI作为子窗体的窗体最好不要用CSkin的窗体。
一定要用。要设置窗体.Shadow=false;
关闭阴影再加入就不会报这个错了。
www.cskin.net
去下载最新版的。看还会报这个错不。
您需要登录后才可以回帖 登录 | 加入CSkin博客

本版积分规则

QQ|申请友链|小黑屋|手机版|Archiver|CSkin ( 粤ICP备13070794号

Powered by Discuz! X3.2  © 2001-2013 Comsenz Inc.  Designed by ARTERY.cn
GMT+8, 2024-4-27 01:04, Processed in 0.577831 second(s), 31 queries , Gzip On.

快速回复 返回顶部 返回列表