TextBox滚动条自动处于最下方
textBox1.SelectionStart = textBox1.Text.Length;
textBox1.SelectionLength = 0;
textBox1.ScrollToCaret();
textBox1.SelectionLength = 0;
textBox1.ScrollToCaret();
Treeview滚动条自动处于最上方
TreeNode node = trvItems.TopNode;
if (node != null)
{
node.EnsureVisible();
}
if (node != null)
{
node.EnsureVisible();
}