Loads the control contents.
| C# | void object.Load(string FileName, string StreamName, SftMaskSaveFormatConstants Format, out object PropertiesLoaded, IStream Stream); |
| VB.NET | object.Load(ByVal FileName As String, ByVal StreamName As String, ByVal Format As SftMaskSaveFormatConstants, ByRef PropertiesLoaded As Object, ByVal Stream As IStream) |
| C++ | HRESULT object->Load(_bstr_t FileName, _bstr_t StreamName, enum SftMaskSaveFormatConstants Format, const _variant_t&* PropertiesLoaded, IStream* Stream); |
| C | HRESULT object->raw_Load(BSTR FileName, BSTR StreamName, enum SftMaskSaveFormatConstants Format, VARIANT* PropertiesLoaded, IStream* Stream); |
object
FileName
A file name, from where the contents are to be loaded. If an empty string is specified, Stream must be specified.
StreamName
Reserved for future use - Ignored. A stream name (part of the compound file FileName), from where the contents are to be loaded.
Format
Reserved for future use - Must be set to saveFormatSftMaskStream. Defines the format of the data being loaded.
PropertiesLoaded
Returns True if the control's properties were loaded, otherwise False. The properties are loaded if the Properties argument of the Save method used to save the data was set to True.
Stream
The stream (IStream interface) from where the data is loaded. If NULL (Nothing) is specified, FileName must be specified.
The Load method loads the control contents.
The Save method can be used to save the control contents in a format suitable for the Load method.
namespace Sample4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Load += (s, e) => {
foreach (Control c in Controls) {
AxSftMaskLib80.AxSftMask mask = c as AxSftMaskLib80.AxSftMask;
if (mask != null) {
mask.DarkMode = SftMaskLib80.SftMaskDarkModeConstants.darkSftMaskAuto; // follow the Windows dark mode setting
mask.HighContrastMode = SftMaskLib80.SftMaskHighContrastConstants.highContrastSftMaskAuto; // follow the Windows High Contrast setting
}
}
};
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each c As Control In Controls
Dim mask As AxSftMaskLib80.AxSftMask = TryCast(c, AxSftMaskLib80.AxSftMask)
If mask IsNot Nothing Then
mask.DarkMode = SftMaskLib80.SftMaskDarkModeConstants.darkSftMaskAuto ' follow the Windows dark mode setting
mask.HighContrastMode = SftMaskLib80.SftMaskHighContrastConstants.highContrastSftMaskAuto ' follow the Windows High Contrast setting
End If
Next
End Sub
Private Sub buttonCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buttonCancel.Click
Application.Exit()
End Sub
See Also SftMask Object | Object Hierarchy