Visio Guy

Visio Discussions => Visio 2013 Issues => Topic started by: Marx on April 27, 2013, 05:08:59 PM

Title: Unable to get the windows handle for the 'AxDrawingControl' control
Post by: Marx on April 27, 2013, 05:08:59 PM
Hello,

I've had Visio 2007 and Visio 2010 concurrently installed on the same development machine for a while with no issues.  After installing Visio 2013 also side-by-side I get the following error for all versions (2007, 2010, 2013) when trying to open a form.  The form is an MdiChild hosting an AxDrawingControl.

System.NotSupportedException: Unable to get the window handle for the 'VisioDrawingControl' control. Windowless ActiveX controls are not supported.
   at System.Windows.Forms.AxHost.EnsureWindowPresent()
   at System.Windows.Forms.AxHost.InPlaceActivate()
   at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
   at System.Windows.Forms.AxHost.CreateHandle()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.AxHost.EndInit()

when calling ((System.ComponentModel.ISupportInitialize)(this.axDrawingControl1)).EndInit();

Appreciate any help.
M