C
C#11mo ago
Pandetthe

❔ Restricting mouse movement

Hi!, I am trying to restrict mouse movement on the area of the whole screen. I am using SetWindowsHookEx for LowLevelMouseProc. For checking monitor area I am using GetMonitorInfo, and here is my problem. When all screens have the same dpi, everything is fine, if primary screen have scaling 125%, and screen where I want to restrict movement 100%, everything is fine but if primary has 100% and second has 125%, boundaries of the screen are wrong.
4 Replies
Jester
Jester11mo ago
Miscellaneous Mouse Operations - Win32 apps
The previous sections have discussed mouse clicks and mouse movement. Here are some other operations that can be performed with the mouse.
Jester
Jester11mo ago
all these functions work with pixels and not dpi so you will have to find a solution for that later
Pandetthe
Pandetthe11mo ago
It's not what I am looking for I want to restrict a mouse movement on specified screen, but allow on others I have working mouse movement restrictor, but I don't know how to get proper dpi aware coordinates of screen
Accord
Accord11mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server
More Posts
❔ How to force enumaration on ExpandoObj?Hey guys, i encountered a situation where i have this ExpandoObj I need to enumerate its properties ❔ DataGrid control in MauiI am migrating a WPF app to Maui and I have issues translating a WPF <DataGrid> to Maui. There doesn❔ Event-Sourcing for a Duplicated Topic between Two MicroServices@Architecture Hi friends, I'm working on a project using `Microservices` architecture, I have `Aut✅ Opinions on Node.js + C++ vs C# for app that accesses the win32 APIHello all. I'm working on an app that can control the volume of applications through a web interface❔ What is the best OCR engine for .NET?I was searching for the best OCR engine that could convert image to text or pdfsearchable..So, what ✅ Cannot figure out resolve issuehttps://github.com/mekasu0124/Diary I have attempted to resolve the issues in my 3 axaml pages. `/✅ How to resolve CS9017 when trying passing captured arguments by primary constructor to base class?I am using C# 12. The base class: ```csharp public class DbExtension(IOptionsMonitor<AppConfig> app❔ System.BadImageFormatException: Cannot load a reference assembly for execution.Hello, I'm trying to debug this exception in my C# app. I've tried solutions from stack overflow -❔ Suppressing ASP0001: AuthorizationMiddleware is incorrectly configuredI am hosting a Blazor server app and a Web API in the same ASP.NET project, and I have set up my rou❔ Spreadsheet option for a dict / class? (visual studio)I finally set a bunch of stuff up and their working correctly, huzah! Now, i have a dictionary that