dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: input format in textbox

  1. #1
    Kurt Klusch Guest

    input format in textbox

    hi.
    if i want to force the user to enter in a textbox a time with this format
    HH:mm:ss what is to do? something like in access 2000 a input format

    thanks



  2. #2
    Simon Sellick Guest

    Re: input format in textbox

    Kurt wrote:
    >hi.
    >if i want to force the user to enter in a textbox a time with this format
    >HH:mm:ss what is to do? something like in access 2000 a input format
    >
    >thanks
    >
    >

    Kurt,
    I don't know if it's the best way, but you can trap the keystrokes and cancel
    (set KeyASCII = 0) any that don't fit the format. Alternatively, you can
    wait for the Validate event then parse and reformat the input to match the
    format required. Or you could use a third-party control that permits input
    formats.
    Simon Sellick.
    Last edited by Brad Jones; 09-01-2016 at 09:06 AM. Reason: removed name

  3. #3
    thomas Guest

    Re: input format in textbox

    "Simon" wrote:
    >
    >Kurt wrote:
    >>hi.
    >>if i want to force the user to enter in a textbox a time with this format
    >>HH:mm:ss what is to do? something like in access 2000 a input format
    >>
    >>thanks
    >>
    >>

    >Kurt,
    >I don't know if it's the best way, but you can trap the keystrokes and cancel
    >(set KeyASCII = 0) any that don't fit the format. Alternatively, you can
    >wait for the Validate event then parse and reformat the input to match the
    >format required. Or you could use a third-party control that permits input
    >formats.
    >Simon Sellick.


    Try to use maskeditbox, it might solve your problem.
    Last edited by Brad Jones; 09-01-2016 at 09:07 AM. Reason: removed email

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center