简体   繁体   中英

Focus set automatically on Winform

I have a form which contains some textBoxes. I have configured the textBox's GotFocus and LostFocus events.

My problem is: When some textBox loses focus, the form automatically set the focus on the first textBox and it triggers the GotFocus event again.

How do I not set the focus by default?

Check the tabindex of the text boxex from where focus is transferred to first text box. I think the TabStop property is set to false for the textboxes for some of the controls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM