Results 1 to 7 of 7

Thread: api to move the cursor

  1. #1

    Thread Starter
    Lively Member israr's Avatar
    Join Date
    May 2001
    Posts
    73

    Smile api to move the cursor

    is there any api throug wich the cursor could be moved in a
    text box.

    Private Sub VBForums_Newthread()
    If Thread.Question = Hard then
    MSGBox "No one can reply..."
    Else If Thread.Question=Easy then
    Print "It's very easy.."
    MsgBox "God helps those who helps themselves."
    End If
    End sub

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    If the textbox is in your app..
    then Text1.setfocus
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    Lively Member israr's Avatar
    Join Date
    May 2001
    Posts
    73
    no to change the cursor position within the text box
    Private Sub VBForums_Newthread()
    If Thread.Question = Hard then
    MSGBox "No one can reply..."
    Else If Thread.Question=Easy then
    Print "It's very easy.."
    MsgBox "God helps those who helps themselves."
    End If
    End sub

  4. #4
    Matthew Gates
    Guest
    To move the | cursor, use the SelStart property.


    Code:
    Text1.SelStart = 0 'moves | cursor to first position in text1

  5. #5

    Thread Starter
    Lively Member israr's Avatar
    Join Date
    May 2001
    Posts
    73
    isn't there any api or any other function.
    Private Sub VBForums_Newthread()
    If Thread.Question = Hard then
    MSGBox "No one can reply..."
    Else If Thread.Question=Easy then
    Print "It's very easy.."
    MsgBox "God helps those who helps themselves."
    End If
    End sub

  6. #6
    Megatron
    Guest
    Send the EM_SETSEL message.

  7. #7
    Matthew Gates
    Guest
    Try the SetCaretPos API function.


    Code:
    Private Declare Function SetCaretPos Lib "user32" _
    (ByVal x As Long, ByVal y As Long) As Long

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