CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2002
    Location
    Toronto
    Posts
    1

    How create Mask Edit Control in VB.NET

    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.

  2. #2
    Join Date
    Aug 2001
    Location
    Minneapolis, MN, USA
    Posts
    150
    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

  3. #3
    Join Date
    Apr 2002
    Location
    AZ
    Posts
    7
    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

  4. #4
    Join Date
    Aug 2001
    Location
    Minneapolis, MN, USA
    Posts
    150
    Yep...

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

    INPUT: 09/28/02

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

  5. #5
    Join Date
    Sep 2005
    Posts
    1

    Question Re: How create Mask Edit Control in VB.NET

    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)

  6. #6
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    1,080

    Re: How create Mask Edit Control in VB.NET

    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/de...bjmaskedit.asp

  7. #7
    Join Date
    Feb 2005
    Location
    Israel
    Posts
    1,475

    Re: How create Mask Edit Control in VB.NET

    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

  8. #8
    Join Date
    Oct 2004
    Posts
    152

    Re: How create Mask Edit Control in VB.NET

    Wait, cant you use .net's requiredfieldvalidators to replicate the behaviour of masked controls in Vb.NET.

    please enlighten me.
    No one does a virgin, life ****s you anyways

  9. #9
    Join Date
    Jul 2005
    Location
    Sydney, Australia
    Posts
    1,080

    Re: How create Mask Edit Control in VB.NET

    Quote Originally Posted by ambreesh
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured