If I am understanding your request correctly you can check in the Leave event to see if the button has the new focus and then ignore the leave event accordingly. What is it that you are doing in the Leave event? If you are validating the entry it may be better to use the Validating event instead. Anyway, somthing like the following: method-id button1_Click final private. procedure division using by value sender as object e as type System.EventArgs. set textBox2::Text to "click" end method. method-id textBox1_Leave final private. procedure division using by value sender as object e as type System.EventArgs. if button1::Focused not = true * process your leave action set textBox2::Text to "leave" end-if end method.
↧