私がX座標とY座標を知っている場合、Windows APIや、マウスポインタをその点に移動させるために使用できる.Netの技術がありますか?マウスを強制的に動かせますか?
マウスを動かすようなツールがあるので、何かがあるはずです。しかし、これらのAPIが.NETで簡単にアクセスできるかどうかはわかりません。 ありますか?
もちろん、WPF、.Net、Windowsを想定してください。
ソリューション
public Window1()
{
InitializeComponent();
NativeMethods.SetCursorPos(300, 300);
}
public partial class NativeMethods
{
[System.Runtime.InteropServices.DllImportAttribute("user32.dll",
EntryPoint = "SetCursorPos")]
[return: System.Runtime.InteropServices.MarshalAsAttribute
(System.Runtime.InteropServices.UnmanagedType.Bool)]
public static extern bool SetCursorPos(int X, int Y);
}