frogman_j
asked on
Scrolling a Textbox
I have tried the scrollwindowex api function, but it doesn't work and i don't want to use a listbox for it.
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=328
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
try this : put a lotta text into the textbox. somewhere towards the end u add "FIND THIS"
put this into a command button
Text1.SelStart = InStr(1, Text1, "FIND THIS")
Text1.SelLength = 0
Text1.SetFocus
' be sure to put this setfocus line in
NOte : instead of the "FIND THIS TEXT" and the instring, u can simply add an average no of chars and repeat this in a timer to create a cute scroll effect.
Hope this solves ur problem .
ARK too has a nice solution for pixels...
put this into a command button
Text1.SelStart = InStr(1, Text1, "FIND THIS")
Text1.SelLength = 0
Text1.SetFocus
' be sure to put this setfocus line in
NOte : instead of the "FIND THIS TEXT" and the instring, u can simply add an average no of chars and repeat this in a timer to create a cute scroll effect.
Hope this solves ur problem .
ARK too has a nice solution for pixels...
ASKER
I used a modification of Ark's code, so put in an answer Ark!
ASKER
never mind, Ark
ASKER
Thanks for the bit of code. I looked at more of the SB_ constants and I can use it like I want now.
ASKER
Just one more question. Is there a way to scroll to the bottom cleanly?
Thanks for points, glad to help you!
About scrolling to bottom - it's simply - no API
Text1.SelStart = Len(Text1.Text)
Cheers
About scrolling to bottom - it's simply - no API
Text1.SelStart = Len(Text1.Text)
Cheers