Question about Focus and selectionstart
hey everyone,
Private Sub rtbreceive_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbOntvangen.TextChanged
rtbreceive.SelectionStart = rtbreceive.TextLength
rtbreceive.ScrollToCaret()
rtbreceive.Focus()
End Sub
rtbreceive = a richtextbox
Would someone give some explanation what a .Focus and .Selectionstart do?:)
Re: Question about Focus and selectionstart
You could just look them up in the documentation?
Anyway... Off the top of my head, SelectionStart gets or sets the cursor position (in character numbers), and Focus is a VB6 left-over that sets the focus to the control. I believe you should now use either control.Select, or Me.ActiveControl = control.
Re: Question about Focus and selectionstart
Re: Question about Focus and selectionstart
.Focus is not something to use normally, as you probably read. Use .Select instead.