Click to See Complete Forum and Search --> : How create Mask Edit Control in VB.NET


dshyryayev
July 12th, 2002, 08:33 AM
Hi!

Yes, in VB 6.0 there is Mask Edit Control.
But is based on AcriveX.

I couldn't find any othes properties for any othes
controls that allow to Mask information being inputted.

In our project we decided to do not use ane ActiveX
objects.

So, does somebody have any idea?
Thanks for any information.

Dima.

nolc
July 17th, 2002, 07:43 AM
You need to add the Microsoft MaskedEdit Box Control in the Windows Forms within the Toolbox....is this what you're asking for?

I have a question....do you know how to retrieve a date value from a masked edit box?

messagebox.show(mskBox.Text) 'GIVES ME NOTHING

Tango23
July 17th, 2002, 11:48 PM
Thanks for the answer on the Masked Edit being in the toolbox/windows forms.

As to your question, try the following

MsgBox(mskbox.ClipText)

Like you when using the .text property, I get an empty messege box, but I was better off using the .cliptext property

nolc
July 18th, 2002, 08:59 AM
Yep...

Minutes after posting my last reply I figured out that.........

INPUT: 09/28/02

mskBox.ClipText = 092802 & mskBox.CtlText = 09/28/02

bdb1040
September 12th, 2005, 03:37 PM
How do you load data into the masked edit box with data taken from a database. It does not work for me?

This is the code I am using but to no avail. It works for a std textbox but not the masked edit. I have the mask set to "999-999-9999"

mbxHomePhone.text = data.Rows(intPos).Item(8)

I use this for the regular textbox and it works fine.

txtCity.Text = data.Rows(intPos).Item(5)

jmcilhinney
September 12th, 2005, 05:35 PM
I suggest you read the following MSDN help topic and then follow the "Properties, Methods, and Events" link at the bottom.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/masked/html/vbobjmaskedit.asp

jhammer
September 13th, 2005, 01:36 AM
Here is a free .NET control someone built for MaskedEditBox:
http://www.codeproject.com/vb/net/cpflexmaskeditbox.asp

So you don't have to use the old control

ambreesh
September 15th, 2005, 12:14 AM
Wait, cant you use .net's requiredfieldvalidators to replicate the behaviour of masked controls in Vb.NET.

please enlighten me.

jmcilhinney
September 15th, 2005, 12:23 AM
Wait, cant you use .net's requiredfieldvalidators to replicate the behaviour of masked controls in Vb.NET.

please enlighten me.I don't know whether that would work or not, but it's Web-only anyway.