Error In Visio 2007 Drawing Control

A

Asif Imran

Hi all,

An exception is occurred when I am going to use Visio 2007 Active X Drawing
Control in my sample application by adding new page after opening drawing
file in Drawing Control.

I did do the following on my machine running Windows XP Professional
(Service Pack 2), NET Framework 1.1 and Visio 2007 Professional Edition.

a) Run project and open any drawing file. File opens normally.

b) To add new drawing page through Insert Page Form, following exception is
occurred on clicking Insert Page Form's Ok button.
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll.
Additional information: Object reference not set to an instance of an
object.

c) If I click on Start button (running project in debugging mode through
Visual Studio) another exception is thrown

An unhandled exception of type 'System.Runtime.InteropServices.SEHException'
occurred in system.windows.forms.dll
Additional information: External component has thrown an exception.

Can anyone tell me about whets I am going wrong?

Thanks

Asif
 
P

Paul Herber

Have you installed .NET 2 and 3 ? They won't interfere with anything
else.
Also, I see from the Powerpoint slides that you are adding a page to a
cross-functional chart. Try this manually, adding a page shows a
dialog box, is your code interfering with this?
 
A

Asif

I installed .NET 2 and 3 but it doesn't solve the issue.
I also used other drawing type (basic flow chart) but same error is
still occurring.
There is no even single line of code in application except on button to
assign filename to control source property, so there is no chance for
code interferes.
 
A

Asif

Yes Christian every thing is going right when manually add a new shape
to drawing but it sounds some bug in Visio 2007 drawing control. Also
one more interesting thing is that if same project is developed in
VS.NET 2005 and do the same steps, different error message is shown:

System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an
indication that other memory is corrupt."

Is there some other way to fix the error as it is not like by the
customers to do it to avoid such error?

Thanks

Asif
 

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