Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Date1 Sample (VB6)

This sample illustrates a popup calendar with validation.

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.Alignment = alignSftMaskLeft ' edit control
    SftMask1.EditStyle = editSftMaskCalendarDropDown
    SftMask1.AutoAdvance = True
    SftMask1.TabAdvance = True
    SftMask1.AllowEmpty = False
    SftMask1.MessageTitle = "Sample"
    SftMask1.MessageEmpty = "Please enter a date"
    SftMask1.MessageInvalid = "Please enter a valid date"
    SftMask1.AutoSize = True
    SftMask1.Calendar.CircleToday = True
    SftMask1.Calendar.WeekNumbers = True
    SftMask1.Calendar.FirstDate = #1/1/2000#
    SftMask1.Calendar.LastDate = #12/31/2020#
    SftMask1.Calendar.ShowToday = True
    SftMask1.Caption.Text = "&Ship Date"
    SftMask1.Caption.Alignment = alignSftMaskCenter
    SftMask1.Caption.Position = positionSftMaskTop
    SftMask1.Caption.BackColor = vbHighlight
    SftMask1.Caption.ForeColor = vbHighlightText
    SftMask1.Contents.DateTime = #1/1/2007#
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

' Button Click Event
Private Sub Command1_Click()
    Dim test As Boolean
    test = SftMask1.Contents.ValidMsg
End Sub


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