Hide Table of Contents
SetClass Method (IPropertyManagerPageActiveX)

Sets the interface to this ActiveX control.

.NET Syntax

Visual Basic (Declaration) 
Function SetClass( _
   ByVal ClassID As System.String, _
   ByVal LicenseKey As System.String _
) As System.Boolean
Visual Basic (Usage) 
Dim instance As IPropertyManagerPageActiveX
Dim ClassID As System.String
Dim LicenseKey As System.String
Dim value As System.Boolean
value = instance.SetClass(ClassID, LicenseKey)
System.bool SetClass( 
   System.string ClassID,
   System.string LicenseKey
System.bool SetClass( 
&   System.String^ ClassID,
&   System.String^ LicenseKey



Class ID for the control


License key for the control

Return Value

Always returns true


See the IPropertyManagerPageActiveX examples.


This method sets the class ID and license key information for the ActiveX control when a PropertyManager page created using the API is shown and the ActiveX control is created. ClassId can be either the name of the control (ProgID) or the class ID (CLSID), for example, "MSCAL.calendar" or "{8E27C92B-1264-101C-8A2F-040224009C02}". Both provide the calendar protocol. You can obtain these strings using a combination of the Microsoft OLE/COM Object Viewer and the registry editor.


VBA example:


' ProgID

bRet = m_pActiveXControl.SetClass("MSCAL.Calendar", "")

bRet = m_pActiveXControl2.SetClass("MSComctlLib.ListViewCtrl", "")



bRet = m_pActiveXControl.SetClass("{8E27C92B-1264-101C-8A2F-040224009C02}", "")

bRet = m_pActiveXControl2.SetClass("{BDD1F04B-858B-11D1-B16A-00C0F0283628}", "")



This method does not check to determine if the creation of the control worked. Instead, the IPropertyManagerPage2Handler5::OnActiveXControlCreated sends notification when an attempt to create the ActiveX control occurs, regardless if it is created or not. Use the IPropertyManagerPage2Handler5::OnActiveXControlCreated method's return value to indicate what action to take if the creation of the control failed.


See Also


SOLIDWORKS 2003 FCS, Revision Number 11.0

Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

Subject:   Feedback on Help Topics
Page:   SetClass Method (IPropertyManagerPageActiveX)
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:


We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again

Web Help Content Version: API Help (English only) 2017 SP05

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.