|
-
May 25th, 2009, 04:34 PM
#1
Thread Starter
Addicted Member
-
May 25th, 2009, 04:38 PM
#2
Re: MaskedTextBox Verification
You're saying you tried " / /"? Because that works for me:
vb.net Code:
Dim emptystring As String = " / /" If Me.MaskedTextBox1.Text = emptystring Then MessageBox.Show("Empty") End If
-
May 25th, 2009, 04:41 PM
#3
Thread Starter
Addicted Member
-
May 25th, 2009, 04:48 PM
#4
Re: MaskedTextBox Verification
try
vb.net Code:
Dim DateVals() As String = Me.MaskedTextBox1.Text.Split("/"c) If (DateVals(0).Length = 2 AndAlso DateVals(1).Length = 2 AndAlso DateVals(2).Length = 4) AndAlso _ (CInt(DateVals(0)) < 32 AndAlso CInt(DateVals(1)) < 13) Then 'month and day check 'days must be 31 or less 'months must be 12 or less 'year can be anything MessageBox.Show("Correctly inputted") Else MessageBox.Show("Invalid input") End If End Sub
-
May 25th, 2009, 04:55 PM
#5
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|