您的位置:首页 > 编程语言 > C#

c#退出窗体关闭所有线程,调整richTextBox使其总在最下边

2017-12-26 22:32 302 查看
private void mainForm_FormClosing(object sender, FormClosingEventArgs e)

        {

                try

                {

                System.Environment.Exit(0);

                }

                catch (Exception)

                {

                    throw;

                }
        }

//调整使其下拉处总在最下边

        private void richTextBoxEx1_TextChanged(object sender, EventArgs e)

        {

            richTextBoxEx1.SelectionStart = richTextBoxEx1.Text.Length; //Set the current caret position at the end

            richTextBoxEx1.ScrollToCaret(); //Now scroll it automatically

        }
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐