using c# winforms vs2008
Howdy,
ive got a textbox on a form with a method being called from the textBox1_Leave event. The mehtod takes the contents of the textbox in question and populates other textboxes based on the contents. My problem is that is the user has focus on the text box then clicks the button to close the form (calling this.close) then the form does not close becasue the textbox leave event gets fired. If the textbox does not have focus on form close then the form closes fine.
If however a user closes the form by clicking the little X close icon in the top corner the it closes fine all the time with out the textbox leave event being fired.
How i duplicate the X close functionality so that i can always close the form without the textbox leave event being fired
thanks for any advice