我用的是VS.NET 2005
在这中情况下不能改变,在调试时已经看到这一行以通过,就好想处理了也没反应:
this.BackgroundImage = back_error;========================================
        private void txtCommand_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                try
                {
                    System.Diagnostics.Process.Start(txtCommand.Text);
                }
                catch(Exception ex)
                {
                    justError = true;
                    this.BackgroundImage = back_error;                    txtCommand.Text = txtCommand.Text + " --*" + ex.Message + "*--";
                }
            }
        }
================================================但这中情况就有,可以看到背景改变了:================================================
        private void txtCommand_KeyPress(object sender, KeyPressEventArgs e)
        {
            this.BackgroundImage = back_error;            if (e.KeyChar == 13)
            {
                try
                {
                    System.Diagnostics.Process.Start(txtCommand.Text);
                }
                catch(Exception ex)
                {
                    justError = true;
                    txtCommand.Text = txtCommand.Text + " --*" + ex.Message + "*--";
                }
            }
        }
================================================到了这种又没有了(真搞不明白):================================================
        private void txtCommand_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 13)
            {
                try
                {
                    System.Diagnostics.Process.Start(txtCommand.Text);
                }
                catch(Exception ex)
                {
                    justError = true;
                    txtCommand.Text = txtCommand.Text + " --*" + ex.Message + "*--";
                }
            }            this.BackgroundImage = back_error;
        }
============================================请各位帮小弟看看这是个什么问题,先谢了!!