
Scroll bar problem on Multiline Textbox
Sorry, I don't have time to fully answer your question, but you can use
SendMessageByNum using:
Declare Function SendMessageBynum Lib "user32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal
lParam As Long) As Long
Const EM_GETFIRSTVISIBLELINE = &HCE
Const EM_GETLINECOUNT = &HBA
Const EM_LINESCROLL = &HB6
i.e.
topline% = SendMessageBynum(Text1.hwnd, EM_GETFIRSTVISIBLELINE, 0, 0&)
to return the line number of the first visible line
linecount% = SendMessageBynum(Text1.hwnd, EM_GETLINECOUNT, 0, 0&)
to return the total number of lines
dl& = SendMessageBynum(Text1.hwnd, EM_LINESCROLL, 0, n)
to scroll the textbox down "n" lines
Hope this points you in the right direction,
Shane.
Quote:
> -----Original Message-----
> Posted At: 15 December 1997 14:38
> Posted To: syntax
> Conversation: Scroll bar problem on Multiline Textbox
> Subject: Scroll bar problem on Multiline Textbox
> When I add some text onto the end of some text in a Multiline textbox
> with
> vertical scroll bars, is it possible to get the textbox to jump to the
> newly added text (at the bottom) and show it on the screen? If I move
> the
> scroll bars and then some new text is added to the textbox, it doesn't
> track back to the bottom (where the added text was put). It tracks
> back to
> the last position the scroll bars were set to.
> Anybody got a solution?
> --
> Regards