Hide Table of Contents
OnActiveXControlCreated Method (IPropertyManagerPage2Handler9)

Called when an attempt to create an ActiveX control on the PropertyManager page occurs.

.NET Syntax

Visual Basic (Declaration) 
Function OnActiveXControlCreated( _
   ByVal Id As System.Integer, _
   ByVal Status As System.Boolean _
) As System.Integer
Visual Basic (Usage) 
Dim instance As IPropertyManagerPage2Handler9
Dim Id As System.Integer
Dim Status As System.Boolean
Dim value As System.Integer
 
value = instance.OnActiveXControlCreated(Id, Status)
C# 
System.int OnActiveXControlCreated( 
   System.int Id,
   System.bool Status
)
C++/CLI 
System.int OnActiveXControlCreated( 
&   System.int Id,
&   System.bool Status
) 

Parameters

Id

ID of this ActiveX control

Status

True if the ActiveX control creation was successful, false if not

Return Value

Action to take if the creation of the ActiveX control failed as defined in swHandleActiveXCreationFailure (see Remarks)

Remarks

When the ActiveX control is created, the program creating the PropertyManager page should receive notification from this handler. Specify one of the available enumerators for this handler's return value:

  • swHandleActiveXCreationFailure_Cancel. Continue creating the PropertyManager page without the ActiveX control. This is the default.

  • swHandleActiveXCreationFailure_Retry. Try to create the ActiveX control again. You can reuse the IPropertyManagerPageActiveX::SetClass method to change the control ID or the license key to perhaps use another similar control or another version of the control, and then specify swHandleActiveXCreationFailure_Retry. Avoid an endless loop situation.

  • swHandleActiveXCreationFailure_Continue. Cancel creating PropertyManager page. For example, it might be that the PropertyManager page is useless without the control, so the calling add-in might want to quit and handle the situation on its own.

For example, if the control is created successfully, then SolidWorks passes true for Status to the add-in and the return value is ignored. If the control fails to be created, SolidWorks passes false for Status to the add-in and the return value is swHandleActiveXCreationFailure_Continue.

 

Do not call IPropertyManagerPageActiveX::GetControl to get the interface object for this ActiveX control.

You cannot get a reference to the ActiveX control inside this event handler because the page is not displayed when this notification is sent. You can only get the reference to the control after the PropertyManager page is displayed.

 

See Also

Availability

SolidWorks 2012 FCS, Revision Number 20.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

 
*Email:  
Subject:   Feedback on Help Topics
Page:   OnActiveXControlCreated Method (IPropertyManagerPage2Handler9)
*Comment:  
*   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:




x

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
x

Web Help Content Version: API Help (English only) 2013 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.