MainWindow Class |
The MainWindow class is a class for binding the .NET dialogs under the Tekla Structures main window.
Inheritance Hierarchy
Namespace: Tekla.Structures.Dialog
Assembly: Tekla.Structures.Dialog (in Tekla.Structures.Dialog.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The MainWindow type exposes the following members.
Properties
Methods
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).
|
Fields
Examples
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); } }
See Also