Visual C# Beta 2 doesn't work with Visio 2003 Drawing Control
axDrawingControl1.EndInit() line.
Commenting this line out crashes the application. Please help
Thanks.
How to get around the Class Not Registered COM Exception of the Visio Drawing Control in Visual Studio 2005 Beta 2
The bad news is you can't!
If you put you a Visio Drawing Control on a form and press F5 to debug, you'll get a COM error on the EndInit line.
But that doesn't mean you can't use the control. What I did was first fire up the application without debugging. (Via executing the app in the bin directory or via the Start without debugging menu item)
Then when the control is loaded, attach the Visual Studio debugger to the process via "Attach To Process" menu item.
Offcourse this still means that while debugging you open a form with the Visio Drawing Control on it, you'll still get the error. You just can't be in debug mode while the control is loading.
As for my disappearing control, I had a listview in the same form. Certain actions on the listview were causing the height of the Visio control to become 0 !