测试代码如下:
测试结果:
测试代码
测试结果:
画面初始化时焦点在textBox1中, 然后输入“1”和“2”。 鼠标点击进入textBox3,输入“1”, 然后点击其他按钮。 |
画面初始化时焦点在textBox1中, 然后输入“1”和“2”。 按tab键进入textBox3,输入“1”, 然后按按tab键焦点移动到richTextBox1。 |
||||||
事件顺序 |
textBox1. |
textBox3. |
ActiveControl |
事件顺序 |
textBox1. |
textBox3. |
ActiveControl |
textBox1_Enter; | FALSE | FALSE | textBox1 | textBox1_Enter; | FALSE | FALSE | textBox1 |
textBox1_GotFocus; | TRUE | FALSE | textBox1 | textBox1_GotFocus; | TRUE | FALSE | textBox1 |
textBox1_KeyDown; | TRUE | FALSE | textBox1 | textBox1_KeyDown; | TRUE | FALSE | textBox1 |
textBox1_KeyPress; | TRUE | FALSE | textBox1 | textBox1_KeyPress; | TRUE | FALSE | textBox1 |
textBox1_TextChanged; | TRUE | FALSE | textBox1 | textBox1_TextChanged; | TRUE | FALSE | textBox1 |
textBox1_KeyUp; | TRUE | FALSE | textBox1 | textBox1_KeyUp; | TRUE | FALSE | textBox1 |
textBox1_KeyDown; | TRUE | FALSE | textBox1 | textBox1_KeyDown; | TRUE | FALSE | textBox1 |
textBox1_KeyPress; | TRUE | FALSE | textBox1 | textBox1_KeyPress; | TRUE | FALSE | textBox1 |
textBox1_TextChanged; | TRUE | FALSE | textBox1 | textBox1_TextChanged; | TRUE | FALSE | textBox1 |
textBox1_KeyUp; | TRUE | FALSE | textBox1 | textBox1_KeyUp; | TRUE | FALSE | textBox1 |
textBox1_Leave; | FALSE | TRUE | textBox3 | textBox1_Leave; | TRUE | FALSE | textBox3 |
textBox1_Validating; | FALSE | TRUE | textBox3 | textBox1_Validating; | TRUE | FALSE | textBox3 |
textBox1_Validated; | FALSE | TRUE | textBox3 | textBox1_Validated; | TRUE | FALSE | textBox3 |
textBox3_Enter; | FALSE | TRUE | textBox3 | textBox3_Enter; | TRUE | FALSE | textBox3 |
textBox3_Click; | FALSE | TRUE | textBox3 | textBox3_TextChanged; | FALSE | TRUE | textBox3 |
textBox3_TextChanged; | FALSE | TRUE | textBox3 | textBox3_Leave; | FALSE | TRUE | richTextBox1 |
textBox3_Leave; | FALSE | FALSE | button1 | textBox3_Validating; | FALSE | TRUE | richTextBox1 |
textBox3_Validating; | FALSE | FALSE | button1 | textBox3_Validated; | FALSE | TRUE | richTextBox1 |
textBox3_Validated; | FALSE | FALSE | button1 |