Creating a click-out event in C #

Is there any simple way to make a method that is called when the user clicks (or changes focus in some other way) from a text box in C #? I'm not very good at how events are handled in C # - I rely on a double-click on a control to automatically generate the btn_Button_Click method.

Thank!

+3
source share
2 answers

You can get a list of events in the properties window for the control. If it is not already visible, display the properties window from the browse menu. Then select the control to which you want to add an event, click the zipper in the properties window (displays events) and add the desired event.

+2
source

Try it , which occurs whenever the control loses focus. Control.OnLostFocus

+6
source

Source: https://habr.com/ru/post/1734155/


All Articles