|
-
Dec 29th, 2010, 11:32 AM
#1
Thread Starter
Fanatic Member
Problem in Maskedtextbox
on the lost focus event of maskedtextbox i made a code that
if maskedtextbox1.text = "" then
msgbox("enter your number")
BUT as focus losts so it does not give message, because masked textbox is not empty because when we give mask so it uses " - " in it. so please assist me in this that what code i write to solve this problem.?
mask is 00000-0000000-0
-
Dec 29th, 2010, 11:46 AM
#2
Re: Problem in Maskedtextbox
How about
vb.net Code:
If MaskedTextBox1.Text = "00000-0000000-0" Then
-
Dec 30th, 2010, 07:40 AM
#3
Thread Starter
Fanatic Member
Re: Problem in Maskedtextbox
 Originally Posted by Hack
How about
vb.net Code:
If MaskedTextBox1.Text = "00000-0000000-0" Then
HI Hack, this code is not working, it still doesn't give the message.
-
Dec 30th, 2010, 01:53 PM
#4
Addicted Member
Re: Problem in Maskedtextbox
hello abid,
this should work...it checks the entire mask for completeness...
vb Code:
If Not MaskedTextBox1.MaskCompleted Then msgbox("enter your number") End If
-
Dec 31st, 2010, 02:02 AM
#5
Thread Starter
Fanatic Member
Re: Problem in Maskedtextbox
Thank You very much sir. its working, but would you please tell me the purpose of this code? i mean you have written that it checks the entire mask for completeness, so what does it means please explain.
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
|