HeaderPane
Main
Hide
Share Link
Print

Load Method, SftMask Object

Loads the control contents.

Syntax

C#void object.Load(string FileName, string StreamName, SftMaskSaveFormatConstants Format, out object PropertiesLoaded, IStream Stream);
VB.NETobject.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);
CHRESULT object->raw_Load(BSTR FileName, BSTR StreamName, enum SftMaskSaveFormatConstants Format, VARIANT* PropertiesLoaded, IStream* Stream);

object

A SftMask 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.

Comments

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.

Examples

C# View entire sample code

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
                    }
                }
            };

VB.NET View entire sample code

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


Last Updated 11/15/2026 - (email)
© 2026 Softel vdm, Inc.