you could do it with API:
Code:
//add this
using System.Runtime.InteropServices;
//then the code is:
public partial class Form1 : Form
{
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam);
const int EM_LINESCROLL = 0xB6;
public Form1()
{
InitializeComponent();
for (int n = 0; n < 20; n++)
{
textBox1.Text += (n.ToString() + Environment.NewLine);
}
}
private void button1_Click(object sender, EventArgs e)
{
// scroll up
SendMessage(textBox1.Handle, EM_LINESCROLL, IntPtr.Zero, (IntPtr)(-1));
}
private void button2_Click(object sender, EventArgs e)
{
// scroll down
SendMessage(textBox1.Handle, EM_LINESCROLL, IntPtr.Zero, (IntPtr)1);
}
}