SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Defines the year where a higher 2-digit year indicates the previous century.
Get
VB.NET | Year = object.CenturyBreak As Integer |
VB | Year = object.CenturyBreak As Long |
C#.NET | int Year = object.CenturyBreak; |
VC++ | long Year = object->CenturyBreak; long Year = object->GetCenturyBreak(); |
C | HRESULT object->get_CenturyBreak(long* Year); |
Put
VB.NET | object.CenturyBreak = Year As Integer |
VB | object.CenturyBreak = Year As Long |
C#.NET | int object.CenturyBreak = Year; |
VC++ | long object->CenturyBreak = Year; void object->PutCenturyBreak(long Year); |
C | HRESULT object->put_CenturyBreak(long Year); |
object
Year
Defines the year where a higher 2-digit year indicates the previous century. If -1 is specified, the current year plus 30 is considered the break value.
The CenturyBreak property defines the year where a higher 2-digit year indicates the previous century.
This value is used when a date without century is entered (i.e., a two digit year). The correct century is determined based on the CenturyBreak property. Any two digit year greater or equal to the CenturyBreak value is assumed to be in the prior century.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftMask1.Mask = "$d" AxSftMask1.Calendar.CenturyBreak = 50 ' 00-49 is 20xx 50-99 is 19xx AxSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskRight AxSftMask1.EditStyle = SftMaskEditStyleConstants.editSftMaskCalendarDropDown AxSftMask1.AutoAdvance = True AxSftMask1.TabAdvance = True AxSftMask1.Caption.Text = "&Ship Date" AxSftMask1.Caption.Alignment = SftMaskAlignConstants.alignSftMaskCenter AxSftMask1.Caption.Position = SftMaskPositionConstants.positionSftMaskTop AxSftMask1.Contents.DateTime = #1/1/2007# AxSftMask1.Caption.BackColor = Convert.ToUInt32(ColorTranslator.ToOle(SystemColors.Highlight) And &HFFFFFFFF&) AxSftMask1.Caption.ForeColor = Convert.ToUInt32(ColorTranslator.ToOle(SystemColors.HighlightText) And &HFFFFFFFF&) AxSftMask1.AutoSize = True End Sub
Private Sub Form_Load() SftMask1.Mask = "$d" SftMask1.Calendar.CenturyBreak = 50 ' 00-49 is 20xx 50-99 is 19xx SftMask1.Alignment = alignSftMaskRight ' edit control SftMask1.EditStyle = editSftMaskCalendarDropDown SftMask1.AutoAdvance = True SftMask1.TabAdvance = True SftMask1.Caption.Text = "&Ship Date" SftMask1.Caption.Alignment = alignSftMaskCenter SftMask1.Caption.Position = positionSftMaskTop SftMask1.Contents.DateTime = #1/1/2007# SftMask1.Caption.BackColor = vbHighlight SftMask1.Caption.ForeColor = vbHighlightText SftMask1.AutoSize = True End Sub
private void Form1_Load(object sender, System.EventArgs e) { axSftMask1.Mask = "$d"; axSftMask1.Calendar.CenturyBreak = 50; // 00-49 is 20xx 50-99 is 19xx axSftMask1.Alignment = SftMaskAlignConstants.alignSftMaskRight; axSftMask1.EditStyle = SftMaskEditStyleConstants.editSftMaskCalendarDropDown; axSftMask1.AutoAdvance = true; axSftMask1.TabAdvance = true; axSftMask1.Caption.Text = "&Ship Date"; axSftMask1.Caption.Alignment = SftMaskAlignConstants.alignSftMaskCenter; axSftMask1.Caption.Position = SftMaskPositionConstants.positionSftMaskTop; axSftMask1.Contents.DateTime = new DateTime(2007, 1, 1); axSftMask1.Caption.BackColor = (uint) ColorTranslator.ToOle(SystemColors.Highlight); axSftMask1.Caption.ForeColor = (uint) ColorTranslator.ToOle(SystemColors.HighlightText); axSftMask1.AutoSize = true;
BOOL CProject1Dlg::OnInitDialog() { CDialog::OnInitDialog(); m_pMask1 = m_Mask1.GetControlUnknown(); _ASSERT(m_pMask1 != NULL); m_pMask1->Mask = _T("$d"); m_pMask1->Calendar->CenturyBreak = 50; // 00-49 is 20xx 50-99 is 19xx m_pMask1->Alignment = alignSftMaskRight; m_pMask1->EditStyle = editSftMaskCalendarDropDown; m_pMask1->AutoAdvance = VARIANT_TRUE; m_pMask1->TabAdvance = VARIANT_TRUE; m_pMask1->Caption->Text = _T("&Ship Date"); m_pMask1->Caption->Alignment = alignSftMaskCenter;
See Also SftMaskCalendar Object | Object Hierarchy