Hide Table of Contents

When an add-in displays a dialog box, the add-in needs to keep the dialog box in front of whatever window launched it. Failure to do so may result in the dialog box disappearing and the user becoming confused.

C++

To keep the dialog box in the foreground, you can specify a parent window handle when the new dialog box is created.

VB.NET or C#

Window handling is supported in SOLIDWORKS PDM Professional 6.4 and later. In SOLIDWORKS PDM Professional 6.4 only, you must also enable the Multithreaded Add-ins Threading policy. 

Unlike Visual Basic 6, VB.NET and C# allow you to create add-in modules that support multi-threading. When SOLIDWORKS PDM Professional runs a multi-threaded NET add-in, it executes it in the same thread as the parent window. Calls to IEdmVault5::SetAddInWnd, which were previously recommended for Visual Basic 6, are no longer necessary.

To keep an add-in window in the foreground, call IEdmVault8::GetWin32Window in the .NET form of your add-in to specify the handle of the parent window.



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:   Keeping Add-in Windows in the Foreground
*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) 2018 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.