SimWinMouse 1.2.1
dotnet add package SimWinMouse --version 1.2.1
NuGet\Install-Package SimWinMouse -Version 1.2.1
<PackageReference Include="SimWinMouse" Version="1.2.1" />
<PackageVersion Include="SimWinMouse" Version="1.2.1" />
<PackageReference Include="SimWinMouse" />
paket add SimWinMouse --version 1.2.1
#r "nuget: SimWinMouse, 1.2.1"
#:package SimWinMouse@1.2.1
#addin nuget:?package=SimWinMouse&version=1.2.1
#tool nuget:?package=SimWinMouse&version=1.2.1
SimWinMouse
NOTE: The modern .NET System.Windows.Forms.Cursor provides an effective means to control the mouse cursor position by setting the Cursor.Position property.
If mouse positioning is all that you need, try Cursor.Position first. However, SimWinMouse will help you accomplish additional scenarios, such as clicking.
Usage
Install SimWinMouse via NuGet
or pull the source and add a project reference.
To immediately move the mouse to the pixel at (100,50) and left-click:
SimMouse.Click(MouseButtons.Left, 100, 50);
To click and drag from (20, 20) to (50, 50):
SimMouse.Act(SimMouse.Action.LeftButtonDown, 20, 20);
Thread.Sleep(10);
SimMouse.Act(SimMouse.Action.LeftButtonUp, 50, 50);
Advanced Mouse Simulation
If you have more advanced scenarios than the simple API above supports, check out the InteropMouse.mouse_event DLL import.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows was computed. net9.0-windows7.0 is compatible. net10.0-windows was computed. net10.0-windows7.0 is compatible. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net10.0-windows7.0
- No dependencies.
-
net8.0-windows7.0
- No dependencies.
-
net9.0-windows7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.