• Welcome to Valhalla Legends Archive.
 

RTB scroll

Started by Lenny, September 20, 2003, 11:26 PM

Previous topic - Next topic

Lenny

Im looking for a way to make the RichTextBox in vb to scroll back down after resizing.
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

iago

rtb1.selstart = len(rtb1.text) .. if that's what you mean, great, but I get the impression that you meant something else.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Lenny

Actually that is what i meant....Works :) Thx

Is there a way using WM_(something) to cause it to scroll down?
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

SiMi

#3
'sets scroll position
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_USER = &H400
Private Const EM_GETSCROLLPOS = (WM_USER + 221)
Private Const EM_SETSCROLLPOS = (WM_USER + 222)
'gets scroll position
Public Type POINTL
   x As Long
   y As Long
End Type

Lenny

Can someone explain exactly that is used?
The Bovine Revolution
Something unimportant

Live Battle.net:

WARNING: The preceding message may have contained content unsuitable for young children.

NetNX

LOL u could just do

Private sub Form_resize()
rtb1.selstart = len(rtb1.text)
End Sub

UserLoser.

Quote from: Lenny on September 23, 2003, 03:17 PM
Can someone explain exactly that is used?


Explains exactly how you can use it here.

mentalCo.

#7
What about in vb.net? i am trying :

rtbMain.SelectionStart = Len(rtbMain.Text)


and it isnt working.


edit: got it to work by setting the focus to the RTB first.

rtbMain.Focus()
rtbMain.SelectionStart() = Len(rtbMain.Text)

mentalCo.

by setting the focus creates a huge problem... any other solution for vb.net?