111,119
社区成员
发帖
与我相关
我的任务
分享
[DllImport("user32.dll")]
public static extern int GetFocus();
IntPtr handle = (IntPtr)GetFocus();
if (handle == null)
this.FindForm().KeyPreview = true;
else
{
Control c = Control.FromHandle(handle);//这就是
}