Click here to Skip to main content
15,885,941 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
I'm trying to set up mask in masked text box for time like excel format .
my mask must be HHHH:mm .

How to do it? Has masked text box the possibility to set it up in that way?

Please help me in this.

Mojahed
Posted
Comments
fjdiewornncalwe 20-Sep-12 14:23pm    
Why the four "HHHH"? There should only ever be 2 characters in this part of the mask, or am I missing something?

1 solution

Read this: http://msdn.microsoft.com/en-us/library/system.windows.forms.maskedtextbox.mask.aspx[^] and use:
C#
MaskedTextBox1.Mak = "0000:00";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900