Altova StyleVision 2024 Professional Edition

The sample Visual Studio solution available in the folder <ApplicationFolder>\Examples\ActiveX\C# illustrates how to consume the StyleVision ActiveX controls. Before attempting to build and run this solution, note the following steps:

 

Step 1: Check the prerequisites

Visual Studio 2010 or later is required to open the sample solution. For the complete list of prerequisites, see Prerequisites.

 

Step 2: Copy the sample to a directory where you have write permissions

To avoid running Visual Studio as an Administrator, copy the source code to a directory where you have write permissions, instead of running it from the default location.

 

Step 3: Check and set all required control properties

The sample application contains one instance of StyleVisionControlDocument and several instances of StyleVisionControlPlaceHolder controls. Double-check that the following properties of these controls are set as shown in the table below:

 

Control name

Property

Property value

axStyleVisionControl

IntegrationLevel

ICActiveXIntegrationOnDocumentLevel

axStyleVisionControlHelperWndSchemaSource

PlaceholderWindowID

2

axStyleVisionControlHelperWndStyleRepository

PlaceholderWindowID

4

axStyleVisionControlHelperWndContextStyle

PlaceholderWindowID

6

axStyleVisionControlHelperWndContextProperties

PlaceholderWindowID

5

axStyleVisionControlHelperWndProject

PlaceholderWindowID

0

axStyleVisionControlHelperWndDesignOverview

PlaceholderWindowID

1

axStyleVisionControlHelperWndDesignTree

PlaceholderWindowID

3

 

Here is how you can view or set the properties of an ActiveX control:

 

1.Open the MDIMain.cs form in the designer window.

 

Note:On 64-bit Windows, it may be necessary to change the build configuration of the Visual Studio solution to "x86" before opening the designer window. If you need to build the sample as a 64-bit application, see Prerequisites.

 

ax_build_config_01

 

2.Open the Document Outline window of Visual Studio (On the View menu, click Other Windows | Document Outline).

 

ax_doc_outline_stylevision

 

 

3.Click an ActiveX control in the Document Outline window, and edit its required property in the Properties window, for example:

 

ax_properties_stylevision

 

Step 4: Set the build platform

Create a build platform configuration that matches the platform under which you want to build (x86, x64). Here is how you can create the build configuration:

 

a.Right-click the solution in Visual Studio, and select Configuration Manager.

b.Under Active solution platform, select New... and then select the x86 or x64 configuration (in this example, x86).

ax_vs_build_platform

 

You are now ready to build and run the solution in Visual Studio. Remember to build using the configuration that matches your target platform (x86, x64); otherwise, runtime errors might occur.

 

 

© 2017-2023 Altova GmbH