borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (How to create self extractor exe in vb)Next Topic (closed exe still running in task manager even) New Topic New Poll Post Reply
AndreaVB Forum : VB General : cursor within a textBox
Poster Message
eranwein
Level: Big Cheese

Registered: 25-04-2005
Posts: 22

icon cursor within a textBox

i need to use cmdButtonds (left & right) to make the cursor move inside a textBox (like the original buttons).

how do i do it?


10-05-2005 at 01:42 AM
View Profile Send Email to User Show All Posts | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: cursor within a textBox

Hi

Private Sub cmdleft_Click()

    If Text1.SelStart > 0 Then
    
        Text1.SelStart = Text1.SelStart - 1
        
    End If
        
    Text1.SetFocus

End Sub

Private Sub cmdright_Click()

    If Text1.SelStart < Len(Text1.Text) Then
    
        Text1.SelStart = Text1.SelStart + 1
        
    End If
        
    Text1.SetFocus

End Sub



Steve  

10-05-2005 at 07:43 AM
View Profile Send Email to User Show All Posts | Quote Reply
eranwein
Level: Big Cheese

Registered: 25-04-2005
Posts: 22
icon Re: cursor within a textBox

as usual, you did it  

10-05-2005 at 10:08 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : cursor within a textBox
Previous Topic (How to create self extractor exe in vb)Next Topic (closed exe still running in task manager even) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder