By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,846 Members | 2,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,846 IT Pros & Developers. It's quick & easy.

input mask in text box

P: 58
Hi,

I have been trying to find the answer to this for a couple days now. What I have is a textbox (txtTime) that the user will enter a time into. What I want is that the user can only enter in the time. I have tried to use a mask edit textbox and set the mask to ##:##, format to hh:mm, PromptChar to 0. I can still enter in numbes that arent time. eg. 30:76. I cannot find anything in textbox properties to help. I want the user to just be able to enter in a valid time (short time). I am using VB6. thank you

Andrew
Jul 27 '08 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
you need to use masked edit control for the purpose..
Jul 28 '08 #2

P: 58
I have been using Masked edit control. I can still enter in invalid times. I not sure how to get it so you can only enter in valid times.

Andrew
Jul 29 '08 #3

debasisdas
Expert 5K+
P: 8,127
better use DTPICKER for the purpose with with proper format.
Jul 29 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.