HRESULT Error Using Visio 2007 Control



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.

.



Relevant Pages

  • Re: Closing the active document in the Visio DrawingControl
    ... Programming with the Microsoft Office Visio 2003 ActiveX Control ... I think that the bottom line is that you simply need to set the SRC property ... When the Visio drawing control is loaded, it displays a blank Visio drawing. ...
    (microsoft.public.visio.developer)
  • Re: VB 2005 Express Third Party Control
    ... Details of the control itself and links to the dll's required are on; ... ListBarGroupView view, Int32 scrollOffset, Boolean controlEnabled, ... ListBarDrawStyle style, ListBarGroupView view, Boolean enabled, Int32 ...
    (microsoft.public.dotnet.languages.vb.controls)
  • Re: Understanding query strings
    ... using the page_load to assign the SelectedValue worked correctly no ... > protected void DropDownList1_DataBinding(object sender, ... > | An error has occurred because a control with id ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Optional Arguments in Sub Procedure
    ... Doug Steele, Microsoft Access MVP ... Sub setCntrlProp(bx As Control, btn As Control, btnVis As Boolean, bxVis ... Optional ctlVis2 As Boolean, Optional ctl3 As ...
    (microsoft.public.access.gettingstarted)
  • Re: Optional Arguments in Sub Procedure
    ... Doug Steele, Microsoft Access MVP ... Sub setCntrlProp(bx As Control, btn As Control, btnVis As Boolean, bxVis ... Optional ctlVis2 As Boolean, Optional ctl3 As ...
    (microsoft.public.access.gettingstarted)

Loading