ThisAddin class

The ThisAddin_Startup() event is a good place to test for the correct Visio version and edition, along with checking that the Visio application events are indeed enabled, otherwise this add-in will not work properly anyway.

private void ThisAddIn_Startup(object sender, System.EventArgs e) { try { veApplication.VisioApplication = this.Application; /* check prereq's */ // check for Visio >= 2010 and Edition >= PRO if (!this.IsVisio14PremiumInstalled) { MessageBox.Show( "This add-in requires the Premium edition of Visio 2010", "Visio Premium edition required", MessageBoxButton.OK, MessageBoxImage.Exclamation); return; } // events must be enabled if (!Convert.ToBoolean(Globals.ThisAddIn.Application. EventsEnabled)) // -1 is TRUE, 0 ...

Get Microsoft Visio 2010 Business Process Diagramming and Validation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.