Get the name of the Focused element in C#

前端 未结 5 1043
甜味超标
甜味超标 2020-12-06 08:53

Is there a function in C# that can return the Name of the Focused element and display it in a text-box or something?

5条回答
  •  醉酒成梦
    2020-12-06 09:19

    I just found that there's a way easier way of doing this if you're not using nested controls. You just reference

    Form1.ActiveControl.Name
    

提交回复
热议问题