Visio 2007 Control Issue - Events are not working

A

Asif

Hi All,

We have a Process Mapping application that uses Visio 2003 Active X
drawing control for diagram mapping using VB.NET.

We did run our application on machine running Visio 2007 Professional
and observe the strange behavior of Drawing control that none of
Drawing control event ( Page Add , Shape Add etc) are raised.

If we open the project code on the same machine (Visio 2007 based) in
Visual Studio 2003, a lot of errors are shown. Some of them are given
below:

Type 'AxMicrosoft.Office.Interop.VisOcx.AxDrawingControl' is not
defined.
Type 'AxMicrosoft.Office.Interop.VisOcx.EVisOcx_PageAddedEvent' is not
defined.
Type 'AxMicrosoft.Office.Interop.VisOcx.EVisOcx_ShapeAddedEvent' is
not defined.
The referenced component 'AxVisOcx' could not be found.
A .NET assembly wrapper for the dependent type library 'VisOcx' could
not be found.
The referenced component 'Visio' could not be found.
The referenced component 'VisOcx' could not be found.

There is an error sign (Yellow Icon) shown in References section of
the Project
(Visio and VisOcx references)

Is there any way to make application compatible with both Visio?
Versions?

Thanks

Asif
 
J

JuneTheSecond

Did you change the refernce to Visio2007 Drawing Control in your program?
 
A

Asif

Did you change the refernce to Visio2007 Drawing Control in your program?

I did drop Visio 2007 Active X control on form and it works well but
once the application runs on machine running Visio 2003, application
crashes with the error:

An unhandled exception of type 'System.IO.FileNotFoundException'
occurred in system.windows.forms.dll
Additional information: File or assembly name
Microsoft.Office.Interop.VisOcx, or one of its dependencies, was not
found.

The issue is how to make application compatible with both Visio
versions.

I have also uploaded a sample application(Visio 2003 Control based) in
zip format at the following URL:

http://drawingtools.webs.io/visio2007/Visio2003Test.zip
 
J

JuneTheSecond

Visio2007 maight be needed, if you wish to run Visio2007 drawing control.
 
A

Asif

Visio2007 maight be needed, if you wish to run Visio2007 drawing control.

Our clients contains both Visio versions (2003 or 2007) so we have to
make changes in our application that must support both versions.

One simple solution is to make separate application setup for each
version but it is not feasible to make duplicate copies of same
application for support and future upgrades.

Our goal is to make such changes in application to be able to run on
both versions with minimum code change.

Is there any way to do it?

Thanks
 
G

Gshell

Have you made any progress on this? I am about to embark on the very same
issue. I have an application that currently uses Visio 2003's ActiveX
control and want to create a single version that will work with both Visio
2003 or Visio 2007. I can easily detect at install time which version of
Visio is present and set a registry value accordingly.
From there I am guessing I could instantiate the proper version of the
control but anticipate that there are going to be a host of other hurdles to
overcome.

Gary
 
G

Gshell

Yes! It can be done. See my thread "Using Visio 2003 or Visio 2007 from
VB.net ActiveX drawing control" in this newsgroup.

Gary
 

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