What's the difference between Control.Select() and Control.Focus()?

后端 未结 6 2164
广开言路
广开言路 2020-12-04 01:35

In WinForms, to set focus to a specific control, I always seem to wind up calling Control.Select() and Control.Focus() to get it t

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 02:09

    Focus(), in some situations, can cause a window owning the control to gain focus if it didn't have focus. Select() does not cause a focus grab by the window.

提交回复
热议问题