Results 1 to 2 of 2

Thread: MaskEdBox, position cursor

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Posts
    1
    Is it possible to set the default position for a masked edit box to the left side, I am using a it for a phone number and I would like the cursor to appear on the first digit regardless od where a user clicks in the box?

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Kinda Works

    This code will set the cursor position to the left on the got focus, but the masked edit control has no mouse events, so this is the only easy way to do it.

    Code:
    Private Sub MaskEdBox1_GotFocus()
    MaskEdBox1.SelStart = 0
    MaskEdBox1.SelLength = 0
    End Sub
    Hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width