Skip to content

Assemblies Region

The Assemblies region is used to load the "System.Windows.Forms" Assembly to the ScriptoForm with the Add-Type cmdlet. This allows for .NET forms and controls to be used with the script. This assembly must be loaded prior to instantiating any form or control.

This region is denoted with the "#region Assemblies" tag and occurs between the Settings and Appearance regions in a ScriptoForm script.

Examples

#region Assemblies
Add-Type -AssemblyName System.Windows.Forms
#endregion

References

Assemblies in .NET | Microsoft Learn