First define a constant value:
const int EM_LINESCROLL = 0x00B6;
user32.dll:
[DllImport("user32.dll")]
static extern int SetScrollPos(IntPtr hWnd, int nBar,
int nPos, bool bRedraw);
[DllImport("user32.dll")]
static extern int SendMessage(IntPtr hWnd, int wMsg,
int wParam, int lParam);
, , :
SetScrollPos(myTextBox.Handle,1,myTextBox.Lines.Length-1,true);
SendMessage(myTextBox.Handle,EM_LINESCROLL,0,
myTextBox.Lines.Length-1);
GetScrollPos() :
[DllImport("user32.dll")]
static extern int GetScrollPos(IntPtr hWnd, int nBar);