Re: Is there a way to prevent a RichTextBox from scrolling?



Thanks for that; same results (I was doing basically the same thing).
When I set the appropriate attribute on the declaration for
GetScrollPos:

[DllImportAttribute( "user32.dll", SetLastError = true )]

And call Marshal.GetLastWin32Error after calling GetScrollPos, I get "The
window does not have scroll bars" when that is the case, but when my
RichTextBox does have scroll bars, I always get "The system cannot find the
file specified".

"Matthias Truxa" <usmail4matt_removeprefix@xxxxxxx> wrote in message
news:<OECnGPoPHHA.4424@xxxxxxxxxxxxxxxxxxxx>...
// this is a class for syntax highlighting // i found somewhere because i
had the same problem.
// you should have a try. take a look at setscrollpos:


.