MainWindow Class |
The MainWindow class is a class for binding the .NET dialogs under the Tekla Structures main window.
SystemObject
Tekla.Structures.DialogMainWindow
Tekla.Structures.DialogMainWindow
Namespace: Tekla.Structures.Dialog
Assembly: Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
The MainWindow type exposes the following members.
| Name | Description | |
|---|---|---|
| AddExternalWindow |
Registers the entire dialog to be insensitive at certain
points, for example while modal Tekla Structures system dialog boxes
are open. When insensitive, the dialog does not respond to any input.
You can remove the registration of the dialog with RemoveExternalWindow(String, IntPtr).
| |
| RemoveExternalWindow |
Removes a registration done with AddExternalWindow(String, IntPtr).
|
This example shows how to use the AddExternalWindow(String, IntPtr) method to register a dialog
to be insensitive while certain Tekla Structures modal dialogs are open.
Unregistering is done similarly using the RemoveExternalWindow(String, IntPtr) method.
using System; using Tekla.Structures.Dialog; using Tekla.Structures.Model; public partial class Form1 : FormBase { // Handles the form load event. protected override void OnLoad(EventArgs e) { base.OnLoad(e); MainWindow.Frame.AddExternalWindow(this.Name, this.Handle); } // Handles the form closed event. protected override void OnClosed(EventArgs e) { MainWindow.Frame.RemoveExternalWindow(this.Name, this.Handle); base.OnClosed(e); } }