HRESULT Error Using Visio 2007 Control

A

Asif

Hi all,

I am using Visio 2003 control in my application using VB.NET 2003.I
have upgraded application from 2003 to 2005 along with change of Visio
control from 2003 to 2007.

Application runs normally after migration but some times crashes with
the following error.

System.Runtime.InteropServices.COMException (0x80070006): The handle
is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))
at Microsoft.Office.Interop.VisOcx.IDrawingControl.get_Window()
at AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl.get_Window()
at SigmaFlowVisio.basProcessMenu.setZoomValue(VSDocument
currentdocument, Object sender)
at
SigmaFlowVisio.frmMainForm.VisioToolbarsManager_AfterToolActivate(Object
sender, ToolEventArgs e)
at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnAfterToolActivate(ToolEventArgs
e)
at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds
id, EventArgs e)
at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.InternalSetActiveTool(ToolBase
tool, Boolean setOn, Boolean clearToolBeingEdited, Boolean
clearToolbarWithCaptureIfNecessary)
at
Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.set_ActiveTool(ToolBase
value)
at
Infragistics.Win.UltraWinToolbars.ControlContainerTool.OnControlEnter(Object
sender, EventArgs args)
at System.Windows.Forms.Control.OnEnter(EventArgs e)
at System.Windows.Forms.Control.NotifyEnter()
at System.Windows.Forms.ContainerControl.UpdateFocusedControl()

I am not sure about the actual cause of this error but may be it
happens after application opens, did not perform any action for long
time and them perform some action like close application or open some
other form. This error was never seen before migration. (Application
was not upgraded to VS 2005).

Can any on help me about why it is happening and what is the
workaround for it.

Thanks a lot.
 
J

JuneTheSecond

Did you replaced Visio control? deleting Visio control 2003 and adding Visio
control 2007.
Did you confirmed if upgraded event procedures in VB.Net2005 are trailing
Hanle sentence?
 
A

Asif

Did you replaced Visio control? deleting Visio control 2003 and adding Visio
control 2007.
Did you confirmed if upgraded event procedures in VB.Net2005 are trailing
Hanle sentence?

Thanks JuneTheSecond,

I did replace Visio control by deleting Visio control 2003 and adding
Visio control 2007.
Also I confirmed that event procedures have trailing Handles sentence.

Any other thing needs to be check ?
 
A

Asif

Thanks JuneTheSecond,

I did replace Visio control by deleting Visio control 2003 and adding
Visio control 2007.
Also I confirmed that event procedures have trailing Handles sentence.

Any other thing needs to be check ?

One more point regarding this issue is that it happens when more than
one application instances are running and one instance is going to
close.

Is this issue has some link to Framework version or some hot fix that
is missing on that machine running the application
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top