I'm adding new logs line to a WinForms TextBox object, and this causes the textbox to scroll to the bottom. How can I prevent this and retain my current position? (a short code snippet would help)
A:
Actually, AppendText() won't do what you want (try adding more text and at some point it all goes awry)
The answer actually lies within the Win32 API, and luckily for us, a fellow SO user has already implemented this behavior perfectly: http://stackoverflow.com/questions/1743448/auto-scrolling-text-box-uses-more-memory-than-expected-c-net-v3-5
ohadsc
2010-02-28 14:57:49