Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Date2 Sample (VB.NET)

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 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 AxSftMask1_UpdateMonth(ByVal sender As Object, ByVal e As AxSftMaskLib70._ISftMaskEvents_UpdateMonthEvent) Handles AxSftMask1.UpdateMonth
    AxSftMask1.Calendar.BoldDate = #1/2/2007#
    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

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