How to use a Masked textbox for time in C #?

3

I'm trying to create a masked textbox that gets the time of a video. But I do not know how to format the masked textbox so that it receives the time in HH: MM: SS: MMM . The amount of time I get from the video is a double . 1 sec = 1000. It is a Windows Form

    
asked by anonymous 16.06.2016 / 18:13

1 answer

2

Just add a MaskedTextBox and add a Custom Mask to it.

I think an image explains better, so just do this:

Anyquestionsyoucanlookatthesereferencesbelow:

Editing after comment

If you want to validate the value, there are some ways to do this in TextBox , but I'd advise using DateTimePicker , which already exists. Using it, simply add a Custom Format to properties. It would look like this:

    
16.06.2016 / 18:21