Insert an ActiveX Control in the Visio Diagram
Contents
[
Hide
]
Developers can add ActiveX controls directly to Microsoft Visio drawings to make the Visio diagram interactive by using Aspose.Diagram for .NET API.
Insert an ActiveX Control Programming Sample
Page class offers AddActiveXControl method and allows developers to insert any type of ActiveX control like command button, combobox, checkbox, listbox, textbox, spin button, radio button, label, image, toggle button and scrollbar.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-diagram/Aspose.Diagram-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir_VisioActiveXControls(); | |
// Instantiate Diagram Object | |
Diagram diagram = new Diagram(); | |
// Insert an ActiveX control | |
diagram.Pages[0].AddActiveXControl(ControlType.Image, 1, 1, 1, 1); | |
// Save diagram | |
diagram.Save(dataDir + "InsertActiveXControl_out.vsdx", SaveFileFormat.VSDX); |