home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form MaskForm
- Caption = "The Mask Form"
- ClientHeight = 1995
- ClientLeft = 3120
- ClientTop = 1635
- ClientWidth = 4245
- Height = 2430
- Left = 3045
- LinkTopic = "Form1"
- ScaleHeight = 1995
- ScaleWidth = 4245
- Top = 1275
- Width = 4395
- Begin TextBox Text3
- Height = 330
- Left = 525
- TabIndex = 3
- Top = 1365
- Width = 1695
- End
- Begin CommandButton Quit
- Caption = "Exit"
- Height = 330
- Left = 2625
- TabIndex = 2
- TabStop = 0 'False
- Top = 1365
- Width = 1170
- End
- Begin TextBox Text2
- Height = 330
- Left = 525
- MaxLength = 13
- TabIndex = 1
- Top = 840
- Width = 1695
- End
- Begin TextBox Text1
- Height = 330
- Left = 525
- TabIndex = 0
- Top = 315
- Width = 1695
- End
- DefInt A-Z
- Dim mask1 As String
- Dim mask2 As String
- Dim mask3 As String
- Dim dotcount As Integer
- Dim wheredot As Integer
- Sub Form_Load ()
- ' use caret or any other character to keep a space after
- ' the right parenthesis
- mask1 = "( )^ - " ' cursor will jump over caret
- Text1.Text = "( ) - " ' put a space instead of caret
- Text1.MaxLength = Len(mask1)
- mask2 = " / / " ' mask and Text MUST be
- Text2.Text = mask2 ' the same length
- Text2.MaxLength = Len(mask2)
- mask3 = "$ . "
- Text3.Text = mask3
- Text3.MaxLength = Len(mask3)
- End Sub
- Sub Quit_Click ()
- End
- End Sub
- Sub Text1_GotFocus ()
- PutCursor Text1, mask1
- End Sub
- Sub Text1_KeyDown (keycode As Integer, Shift As Integer)
- KeyDelete Text1, keycode, mask1
- End Sub
- Sub Text1_KeyPress (keyascii As Integer)
- KeyData Text1, keyascii, mask1, dotcount, wheredot
- End Sub
- Sub Text2_GotFocus ()
- PutCursor Text2, mask2
- End Sub
- Sub Text2_KeyDown (keycode As Integer, Shift As Integer)
- KeyDelete Text2, keycode, mask2
- End Sub
- Sub Text2_KeyPress (keyascii As Integer)
- KeyData Text2, keyascii, mask2, dotcount, wheredot
- End Sub
- Sub Text3_GotFocus ()
- PutCursor Text3, mask3
- IsADot mask3, dotcount, wheredot
- End Sub
- Sub Text3_KeyDown (keycode As Integer, Shift As Integer)
- KeyDelete Text3, keycode, mask3
- End Sub
- Sub Text3_KeyPress (keyascii As Integer)
- KeyData Text3, keyascii, mask3, dotcount, wheredot
- End Sub
- Sub Text3_LostFocus ()
- AddZeros Text3, mask3, dotcount, wheredot
- End Sub
-