ActiveX 控件只接受在 GraphicsUnit.Point 中定义的字体
本帖最后由 likytkyt 于 2011-09-08 17:57:41 编辑 做二次开发,添加了一个控件,使用vs编译通过,在IE测试就 出现如题 的异常,求解!!!!!
************** 异常文本 **************
System.ArgumentException: ActiveX 控件只接受在 GraphicsUnit.Point 中定义的字体。
参数名: font
在 System.Windows.Forms.AxHost.GetIFontFromFont(Font font)
在 System.Windows.Forms.AxHost.QuickActivate()
在 System.Windows.Forms.AxHost.ActivateAxControl()
在 System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
在 System.Windows.Forms.AxHost.CreateHandle()
在 System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
在 System.Windows.Forms.Control.CreateControl()
在 System.Windows.Forms.Control.ControlCollection.Add(Control value)
在 VidoeControl.VideoControl.SplitScreen(Int32 num) 位置 C:\Users\scisun_server\Documents\Visual Studio 2008\Projects\VidoeControl\VidoeControl\VideoControl.cs:行号 209
在 VidoeControl.VideoControl.btnFourScreen_Click(Object sender, EventArgs e) 位置 C:\Users\scisun_server\Documents\Visual Studio 2008\Projects\VidoeControl\VidoeControl\VideoControl.cs:行号 252
在 System.Windows.Forms.Control.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnClick(EventArgs e)
在 System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
在 System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ButtonBase.WndProc(Message& m)
在 System.Windows.Forms.Button.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** 已加载的程序集 **************
mscorlib
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
VidoeControl
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Users/scisun_server/Documents/Visual%20Studio%202008/Projects/VidoeControl/VidoeControl/bin/Debug/VidoeControl.dll
----------------------------------------
System.Windows.Forms
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5447 (Win7SP1GDR.050727-5400)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
AxInterop.M7MX1CLib
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Users/scisun_server/Documents/Visual%20Studio%202008/Projects/VidoeControl/VidoeControl/bin/Debug/AxInterop.M7MX1CLib.DLL
----------------------------------------
mscorlib.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5446 (Win7SP1GDR.050727-5400)
基本代码: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Windows.Forms.resources
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.5420 (Win7SP1.050727-5400)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_zh-CHS_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------
Interop.M7MX1CLib
程序集版本: 1.0.0.0
Win32 版本: 1.0.0.0
基本代码: file:///C:/Users/scisun_server/Documents/Visual%20Studio%202008/Projects/VidoeControl/VidoeControl/bin/Debug/Interop.M7MX1CLib.DLL
----------------------------------------
Accessibility
程序集版本: 2.0.0.0
Win32 版本: 2.0.50727.4927 (NetFXspW7.050727-4900)
基本代码: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Microsoft.mshtml
程序集版本: 7.0.3300.0
Win32 版本: 7.0.3300.0
基本代码: file:///C:/Windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
************** JIT 调试 **************
要启用实时(JIT)调试,
该应用程序或计算机的 .config 文件(machine.config)的 system.windows.forms 节中必须设置
jitDebugging 值。
编译应用程序时还必须启用
调试。
例如:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
启用 JIT 调试后,任何无法处理的异常
都将被发送到在此计算机上注册的 JIT 调试器,
而不是由此对话框处理。
[解决办法]
我也遇到了,不知道怎么做,我是用的Dotnetbar做的