0

我正在寻找一个 api,它可以导致在 windows 桌面上发生 windows 选择/突出显示事件,而实际上不会导致鼠标光标移动。我可以使鼠标光标随以下移动:

public static extern bool SetCursorPos(int X, int Y);

但这会将实际光标移动到该点...我正在寻找一种仅通过使用选项卡和箭头键在 Windows 桌面上移动来突出显示的方法。任何建议表示赞赏..

问候,抢劫

4

1 回答 1

0

I think you may be looking for SetFocus. You can get a control's handle with Control.Handle or FindWindow , and p/invoke SetFocus (use IntPtr as the argument type).

于 2013-09-25T16:58:25.843 回答