?
Solved

Implementing a masked edit text box in C#

Posted on 2006-06-05
2
Medium Priority
?
914 Views
Last Modified: 2012-06-27
Hello,

Is there a way to implement a masked edit text box in C#?

Specifically, I want to place a text box on a form that only accepts input in a time format (ie:  10:11:02); so that the first character has to be a digit between 0 and 9, the second has to be a character between 0 and 9, the third has to be a : character, etc.

Thanks in advance,
Tim
0
Comment
Question by:tmitchell68
2 Comments
 
LVL 35

Accepted Solution

by:
mrichmon earned 1050 total points
ID: 16837770
You can use javascript or some other scripting to auto format as keys are pressed and remove non-allowed characters.

For example Turbo Tax and H&R Block tax programs use this - especially on the web versions
0
 
LVL 6

Expert Comment

by:neilprice
ID: 16837775
There are a ton of links if you search on google.

This one seems to fit your bill:

http://www.codeproject.com/vb/net/Complete_Textbox.asp?df=100&forumid=161445&exp=0&select=1062435

Let me know if this is what you need else I'll hunt some more,
Neil
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question