用VS2008对visio进行二次开发找不到组织了。 现在在看visio 2007 SDK的一些例子,其中一个例子officePlan,用自带的代码编译后成功后,画了一个图保存后,然后再打开,居然提示出错。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 目前还没搞懂怎么把visio的组件放到form上。哎 在drawingControl.Src = fileName;这里提示错误未处理 System.AccessViolationException Message="尝试读取或写入受保护的内存。这通常指示其他内存已损坏。" Source="Microsoft.Office.Interop.VisOcx" StackTrace: 在 Microsoft.Office.Interop.VisOcx.DrawingControlClass.set_Src(String pVal) 在 AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl.set_Src(String value) 在 Microsoft.Samples.Visio.OfficePlan.CSharp.OfficePlanSampleForm.onMenuFileOpenClicked(Object sender, EventArgs e) 位置 C:\Program Files\Microsoft Office\Office12\VisSDK\Samples\Office Plan\CSharp\frmOfficePlanSample.cs:行号 1007 在 System.Windows.Forms.MenuItem.OnClick(EventArgs e) 在 System.Windows.Forms.MenuItem.MenuItemData.Execute() 在 System.Windows.Forms.Command.Invoke() 在 System.Windows.Forms.Command.DispatchID(Int32 id) 在 System.Windows.Forms.Control.WmCommand(Message& m) 在 System.Windows.Forms.Control.WndProc(Message& m) 在 System.Windows.Forms.ScrollableControl.WndProc(Message& m) 在 System.Windows.Forms.ContainerControl.WndProc(Message& m) 在 System.Windows.Forms.Form.WndProc(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) 在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) 在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) 在 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) 在 Microsoft.Samples.Visio.OfficePlan.CSharp.OfficePlanSampleForm.Main() 位置 C:\Program Files\Microsoft Office\Office12\VisSDK\Samples\Office Plan\CSharp\frmOfficePlanSample.cs:行号 202 在 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() InnerException: 重复注册事件会出错的请参考下我的软件,配电网络可视化管理系统http://www.iqidi.com 这个例子没问题,呵呵,有需要做VISIO二次开发的加我QQ:67132140一起解决难题 换个标题.大家都来吧.散分 控制台程序能与事件交互吗? C#2005中想要一个窗体在本程序所有其他窗体上面而不是windows所有窗体上面如何处理? 我这有一套新闻系统的源代码,请大家帮我调试下 Rundll32 Application Error 用SqlCommander调用存储过程时如果有多个参数,该怎样写? 用javascript写关于隐藏层的方法 C#按格式打印 eterm调用接口问题 急 在线等!!!!!!!!! 警告窗! .NET 连接 DB2 报错 QQ是如何感知到全屏播放事件的?
Message="尝试读取或写入受保护的内存。这通常指示其他内存已损坏。"
Source="Microsoft.Office.Interop.VisOcx"
StackTrace:
在 Microsoft.Office.Interop.VisOcx.DrawingControlClass.set_Src(String pVal)
在 AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl.set_Src(String value)
在 Microsoft.Samples.Visio.OfficePlan.CSharp.OfficePlanSampleForm.onMenuFileOpenClicked(Object sender, EventArgs e) 位置 C:\Program Files\Microsoft Office\Office12\VisSDK\Samples\Office Plan\CSharp\frmOfficePlanSample.cs:行号 1007
在 System.Windows.Forms.MenuItem.OnClick(EventArgs e)
在 System.Windows.Forms.MenuItem.MenuItemData.Execute()
在 System.Windows.Forms.Command.Invoke()
在 System.Windows.Forms.Command.DispatchID(Int32 id)
在 System.Windows.Forms.Control.WmCommand(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 System.Windows.Forms.ScrollableControl.WndProc(Message& m)
在 System.Windows.Forms.ContainerControl.WndProc(Message& m)
在 System.Windows.Forms.Form.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
在 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
在 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
在 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)
在 Microsoft.Samples.Visio.OfficePlan.CSharp.OfficePlanSampleForm.Main() 位置 C:\Program Files\Microsoft Office\Office12\VisSDK\Samples\Office Plan\CSharp\frmOfficePlanSample.cs:行号 202
在 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()
InnerException:
请参考下我的软件,配电网络可视化管理系统
http://www.iqidi.com