Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Date2 Sample (VB6)

This sample illustrates a popup calendar.

This is not an executable sample, so a complete project is not provided. These statements are intended to show basic concepts and the syntax used.

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 Sub SftMask1_UpdateMonth(ByVal Dt As Date)
    SftMask1.Calendar.BoldDate = #1/2/2007#
    SftMask1.Calendar.BoldDate = #1/9/2007#
    SftMask1.Calendar.BoldDate = #1/16/2007#
    SftMask1.Calendar.BoldDate = #1/23/2007#
    SftMask1.Calendar.BoldDate = #1/30/2007#
End Sub

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