SimWinMouse 1.2.1

dotnet add package SimWinMouse --version 1.2.1
                    
NuGet\Install-Package SimWinMouse -Version 1.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SimWinMouse" Version="1.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SimWinMouse" Version="1.2.1" />
                    
Directory.Packages.props
<PackageReference Include="SimWinMouse" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SimWinMouse --version 1.2.1
                    
#r "nuget: SimWinMouse, 1.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SimWinMouse@1.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SimWinMouse&version=1.2.1
                    
Install as a Cake Addin
#tool nuget:?package=SimWinMouse&version=1.2.1
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last Updated
1.2.1 107 5/2/2026
1.0.3 1,164 11/17/2024
1.0.2 56,327 11/4/2018
1.0.0 2,425 11/26/2017