Determines whether the contents are valid (with error message handling).
Get
| C# | bool Boolean = object.ValidMsg; |
| VB.NET | Boolean = object.ValidMsg As Boolean |
| C++ | VARIANT_BOOL Boolean = object->ValidMsg; VARIANT_BOOL Boolean = object->GetValidMsg(); |
| C | HRESULT object->get_ValidMsg(VARIANT_BOOL* Boolean); |
object
Boolean
Determines whether the contents are valid (with error message handling).
| Boolean | Description |
|---|---|
| True | The control's contents are valid. |
| False | The control's contents are not valid. An error message based on MessageEmpty or MessageInvalid has been displayed. |
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.
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;
}
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
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