Hide

SftMask/OCX 7.0 - ActiveX Masked Edit Control

Display
Print

Phone2 Sample (VB6)

This sample illustrates phone number entry.

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 = "(!0###!!) !1###!!\-!2####!!"
    SftMask1.Caption.Text = "&Phone Number: "
    SftMask1.Caption.SizePercent = 40
    SftMask1.Caption.Alignment = alignSftMaskRight
    SftMask1.Caption.Position = positionSftMaskLeft
    SftMask1.Caption.VerticalAlignment = valignSftMaskBaseline
    SftMask1.AutoSize = True
    SftMask1.Text = "9415058600"
    MsgBox ("The area code is " & SftMask1.Contents.Value(0))
    MsgBox ("The exchange is " & SftMask1.Contents.Value(1))
    MsgBox ("The last 4 digits are " & SftMask1.Contents.Value(2))
    SftMask1.Contents.Value(2) = "8555"
End Sub

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