HeaderPane
Main
Hide
Share Link
Print

ValidMsg Property, SftMaskContents Object

Determines whether the contents are valid (with error message handling).

Syntax

Get

C#bool Boolean = object.ValidMsg;
VB.NETBoolean = object.ValidMsg As Boolean
C++VARIANT_BOOL Boolean = object->ValidMsg;
VARIANT_BOOL Boolean = object->GetValidMsg();
CHRESULT object->get_ValidMsg(VARIANT_BOOL* Boolean);

object

A SftMaskContents object.

Boolean

Determines whether the contents are valid (with error message handling).

BooleanDescription
TrueThe control's contents are valid.
FalseThe control's contents are not valid. An error message based on MessageEmpty or MessageInvalid has been displayed.

Comments

The ValidMsg property determines whether the contents are valid (with error message handling).

The error message defined by the MessageEmpty or MessageInvalid properties is displayed if the contents are empty or invalid.

The AllowEmpty property defines whether the contents are optional (valid even if empty).

If the control contents don't match the defined mask (see Mask property), the ValidationError event occurs.

If the control contents are valid and match the defined mask (see Mask property), the CustomValidation event is invoked.

The Contents.Valid property can also be used to determine whether the contents are valid without the display of an error message.

Examples

C# View entire sample code

    axSftMask1.Calendar.BoldDate = new DateTime(2007, 1, 16);
    axSftMask1.Calendar.BoldDate = new DateTime(2007, 1, 23);
    axSftMask1.Calendar.BoldDate = new DateTime(2007, 1, 30);
}

private void button1_Click(object sender, System.EventArgs e)
{
    bool test;
    test = axSftMask1.Contents.ValidMsg;
}

VB.NET View entire sample code

    AxSftMask1.Calendar.BoldDate = #1/9/2007#
    AxSftMask1.Calendar.BoldDate = #1/16/2007#
    AxSftMask1.Calendar.BoldDate = #1/23/2007#
    AxSftMask1.Calendar.BoldDate = #1/30/2007#
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim test As Boolean
    test = AxSftMask1.Contents.ValidMsg
End Sub

C++ View entire sample code

    m_pMask1->Calendar->BoldDate = COleDateTime(2007, 1, 16, 0,0,0);
    m_pMask1->Calendar->BoldDate = COleDateTime(2007, 1, 23, 0,0,0);
    m_pMask1->Calendar->BoldDate = COleDateTime(2007, 1, 30, 0,0,0);
}

void CProject1Dlg::OnButton1()
{
    VARIANT_BOOL Test;
    Test = m_pMask1->Contents->ValidMsg;
}

BEGIN_EVENTSINK_MAP(CProject1Dlg, CDialog)
    //{{AFX_EVENTSINK_MAP(CProject1Dlg)
    ON_EVENT(CProject1Dlg, IDC_SFTMASK1, 28 /* UpdateMonth */, OnUpdateMonthSftMask1, VTS_DATE)
    //}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

See Also SftMaskContents Object | Object Hierarchy


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