Vertical alignment constants.
| Name | Value | Description |
|---|---|---|
| valignSftMaskTop | 0 | Top |
| valignSftMaskBaseline | 1 | Baseline |
| valignSftMaskCenter | 2 | Center |
| valignSftMaskBottom | 3 | Bottom |
private void Form1_Load(object sender, System.EventArgs e)
{
axSftMask1.Mask = @"(!0###!!) !1###!!\-!2####!!";
axSftMask1.Caption.Text = "&Phone Number: ";
axSftMask1.Caption.SizePercent = 40;
axSftMask1.Caption.Alignment = SftMaskAlignConstants.alignSftMaskRight;
axSftMask1.Caption.Position = SftMaskPositionConstants.positionSftMaskLeft;
axSftMask1.Caption.VerticalAlignment = SftMaskVerticalAlignConstants.valignSftMaskBaseline;
axSftMask1.AutoSize = true;
axSftMask1.Text = "9415058600";
MessageBox.Show("The area code is " + axSftMask1.Contents.get_Value(0).ToString());
MessageBox.Show("The exchange is " + axSftMask1.Contents.get_Value(1).ToString());
MessageBox.Show("The last 4 digits are " + axSftMask1.Contents.get_Value(2).ToString());
axSftMask1.Contents.set_Value(2, "8555");
}Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AxSftMask1.Mask = "(!0###!!) !1###!!\-!2####!!" AxSftMask1.Caption.Text = "&Phone Number: " AxSftMask1.Caption.SizePercent = 40 AxSftMask1.Caption.Alignment = SftMaskAlignConstants.alignSftMaskRight AxSftMask1.Caption.Position = SftMaskPositionConstants.positionSftMaskLeft AxSftMask1.Caption.VerticalAlignment = SftMaskVerticalAlignConstants.valignSftMaskBaseline AxSftMask1.AutoSize = True AxSftMask1.Text = "9415058600" MsgBox("The area code is " & AxSftMask1.Contents.Value(0)) MsgBox("The exchange is " & AxSftMask1.Contents.Value(1)) MsgBox("The last 4 digits are " & AxSftMask1.Contents.Value(2)) AxSftMask1.Contents.Value(2) = "8555" End Sub
See Also Object Hierarchy