How to enforce hour format?
I am using a textbox in vb.net but the input should be an hour format for example, "13h30". How can I enfprce this by a user? When he puts the first 2 digits like 13 then automatic开发者_如何学运维ly the appl. puts a "h" between? Or is there a better solution?
thx
If you are using WinForms then you could use a masked textbox
with a mask of 00h00
. This doesn't work too well if they subsequently want to edit the value they have entered though as the rightmost digits are shifted left if you do a backspace. You may be better off making a user control
精彩评论