Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

PswdChar Property, SftMask Object

Defines the character used to mask password fields.

Syntax

Get

VB.NETPswd = object.PswdChar As String
VBPswd = object.PswdChar As String
C#.NETstring Pswd = object.PswdChar;
VC++_bstr_t Pswd = object->PswdChar;
_bstr_t Pswd = object->GetPswdChar();
CHRESULT object->get_PswdChar(BSTR* Pswd);

Put

VB.NETobject.PswdChar = Pswd As String
VBobject.PswdChar = Pswd As String
C#.NETstring object.PswdChar = Pswd;
VC++_bstr_t object->PswdChar = Pswd;
void object->PutPswdChar(_bstr_t Pswd);
CHRESULT object->put_PswdChar(BSTR Pswd);

object

A SftMask object.

Pswd

Defines the character used to mask password fields. Only one single character can be specified. If an empty string is specified, no password masking character is defined.

Comments

The PswdChar property defines the character used to mask password fields.

When used with a Masked Edit control (with Mask), all text defined using the <p subtoken is masked using the specified password character. It is possible to mask only portions of an edit control using the <p subtoken.

When used with a simple edit control (without Mask), all text is masked using the specified password character.

If no password masking character is defined, text is displayed as-is.

Examples

VB.NET

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    AxSftMask1.Caption.SizePercent = 33
    AxSftMask1.Caption.Text = "&Password"
    AxSftMask1.PromptUnderline = False
    AxSftMask1.Mask = ""
    AxSftMask1.PswdChar = "*"
    AxSftMask1.MaxLength = 16
End Sub

VB6

Private Sub Form_Load()
    SftMask1.Caption.SizePercent = 33
    SftMask1.Caption.Text = "&Password"
    SftMask1.PromptUnderline = False
    SftMask1.Mask = ""
    SftMask1.PswdChar = "*"
    SftMask1.MaxLength = 16
End Sub

C#

private void Form1_Load(object sender, System.EventArgs e)
{
    axSftMask1.Caption.SizePercent = 33;
    axSftMask1.Caption.Text = "&Password";
    axSftMask1.PromptUnderline = false;
    axSftMask1.Mask = "";
    axSftMask1.PswdChar = "*";
    axSftMask1.MaxLength = 16;
}

C++

    m_pMask1 = m_Mask1.GetControlUnknown();
    _ASSERT(m_pMask1 != NULL);

    m_pMask1->Caption->SizePercent = 33;
    m_pMask1->Caption->Text = _T("&Password");
    m_pMask1->PromptUnderline = VARIANT_FALSE;
    m_pMask1->Mask = _T("");
    m_pMask1->PswdChar = _T("*");
    m_pMask1->MaxLength = 16;

    return TRUE;  // return TRUE  unless you set the focus to a control
}

See Also SftMask Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.