Scrolling textboxes programmatically using WndProc messages.
Posted
by Hannes Nel
on Stack Overflow
See other posts from Stack Overflow
or by Hannes Nel
Published on 2010-04-04T01:12:31Z
Indexed on
2010/04/04
1:13 UTC
Read the original article
Hit count: 522
Hi,
I'm trying to scroll a textbox using the form's WndProc method. The code I've come up with so far, after scouring the internet, looks like this:
private void ScrollTextBox()
{
scrollMessage = Message.Create(TabContents.Handle, 0x00B6, new IntPtr(0x0003), new IntPtr(0x0000));
this.WndProc(ref scrollMessage);
}
where TabContents is a TextBox.
For some reason, nothing happens when i call this method. I'd like to know why. I realise that i can accomplish the same with the MoveToCaret method, but I'm curious why this is not working.
© Stack Overflow or respective owner