Visio 2007 Drawing Control failed to initialize in VS2005 Project

L

Larry

I create a simple window form project in C# and added the Visio 2007 Drawing
control on a form and hit F5 and I get the following in InitializeComponent
method
on the line
((System.ComponentModel.ISupportInitialize)(this.axDrawingControl1)).EndInit();

It works if I use Visio 2003 in VS2005. I can consistantly reproduce on two
different machine. Did I miss something?

Larry

--------------------------------------------------
System.Runtime.InteropServices.COMException was unhandled
Message="Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG))"
Source="System.Windows.Forms"
ErrorCode=-2147221164
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&
clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid
clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
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()
at WindowsApplication2.Form1.InitializeComponent() in
C:\Projects\WindowsApplication2\WindowsApplication2\Form1.Designer.cs:line 54
at WindowsApplication2.Form1..ctor() in
C:\Projects\WindowsApplication2\WindowsApplication2\Form1.cs:line 16
at WindowsApplication2.Program.Main() in
C:\Projects\WindowsApplication2\WindowsApplication2\Program.cs:line 17
 
A

Al Edlund

Is it possible that you didn't add the v2007 drawing control (and other
libraries) to your project?
al
 
L

Larry

VS2005 added all the require assemblies reference for me when I drag the
Drawing control on to my form and it compiles perfectly fine.
 
L

Larry

Yes, Visio 2007 Installed. Otherwise, the control won't show up in the VS2005
Toolbox. The Visio 2007 Drawing Control shown up fine in design mode in
VS2005. I can even set the SRC property and the Visio drawing come up fine
in design time. As soon as I run the application.
 
A

Al Edlund

Well, I'd probably try to start to understand why this is 'close' to the
root of what the message was saying

al
 
J

Jeff at Bennet-Tec.com

Make sure it is installed on end-user machines - not just the developer machine
 

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