A reimplementation of the "sticky cursor" part of Dual Monitor Tools, made to test my C# abilities and experiment with Windows SDKs.
Currently, it places horizontal and vertical "sticky borders" right down the middle of a 1080p monitor, which can be configured with a couple of edits to CursorControl.cs
. If your cursor touches one, it will be prevented from going further until it's moved an additional 500 pixels towards it, at which point it will break through.
Currently, the UI window that pops up must be the active (focused) window if you want this functionality to work. I'm working to diagnose and rectify this...
According to the build log, you may need to install the Windows App SDK for it to work.
IDE: Visual Studio Community 2022
Language: C# with WinUI 3 (part of the Windows App SDK)
- WinUI 3 Gallery
- Template Studio for WinUI extension
winuser.h
(user32.dll
) documentation- Low-level keyboard/mouse hook library that I'm not currently using
Laid out in TODOs all over the code.
- Use a low-level mouse hook instead of directly interfacing with it - needed for global functionality
- Add useful settings to the UI
- "Minimize to tray icon" functionality
- And a whole lot more!