How to prevent stealing focus when clicking on a u

2019-05-13 07:20发布

问题:

This question already has an answer here:

  • Is there a way to make a UserControl unfocussable? 6 answers

I want to be able to click on my user control and not have it steal focus from any other control. I know when you click on a label it doesn't steal focus. How can this be done?

回答1:

Try disabling your control's ControlStyles.Selectable flag.