input mask in text box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rudeman76
    New Member
    • Oct 2007
    • 58

    input mask in text box

    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
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    you need to use masked edit control for the purpose..

    Comment

    • rudeman76
      New Member
      • Oct 2007
      • 58

      #3
      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
      Last edited by rudeman76; Jul 29 '08, 04:53 AM. Reason: wrong word

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        better use DTPICKER for the purpose with with proper format.

        Comment

        Working...