M
MIchael Ullrich
Hi,
I have an Application with many child-forms. the child-forms have
richtext-boxes.
For adding to the boxes I have the following event:
Private Sub StatusText_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles StatusText.TextChanged
If StatusText.TextLength > 10 Then
StatusText.Select(StatusText.TextLength, 0)
StatusText.Focus()
StatusText.ScrollToCaret()
End If
End Sub
The problem is now, that the focus is always moved to the
richtext-box. Is there a way to notice the currently focused control,
so that I can set back the focus to the last control.
Or is there a way to go to the end of the richtextbox-text each time I
add something?
Thanks
Mike
I have an Application with many child-forms. the child-forms have
richtext-boxes.
For adding to the boxes I have the following event:
Private Sub StatusText_TextChanged(ByVal sender As Object, ByVal e
As System.EventArgs) Handles StatusText.TextChanged
If StatusText.TextLength > 10 Then
StatusText.Select(StatusText.TextLength, 0)
StatusText.Focus()
StatusText.ScrollToCaret()
End If
End Sub
The problem is now, that the focus is always moved to the
richtext-box. Is there a way to notice the currently focused control,
so that I can set back the focus to the last control.
Or is there a way to go to the end of the richtextbox-text each time I
add something?
Thanks
Mike