DarkCoderSc / PowerRemoteDesktop_LogonUI

WinLogon I/O (LogonUI) Plugin for PowerRemoteDesktop
Apache License 2.0
25 stars 5 forks source link

Interact with keyboard and mouse #2

Closed Transis-Felipe closed 8 months ago

Transis-Felipe commented 8 months ago

Hello,

First, congratulations for this code.

Can you give me a clue about what how to interact with keyboard and mouse on winlogon ?

I,ve already tried mouse_event and sendinput with no sucess

Transis-Felipe commented 8 months ago

I've already found the solution.

            public static void SetMouseCursorPos(int X = 0, int Y = 0)
            {
                int x_screen = GetSystemMetrics(SM_CXSCREEN);
                int y_screen = GetSystemMetrics(SM_CYSCREEN);

                mouse_event(MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE, (65535 * X) / x_screen, (65535 * Y) / y_screen, 0, 0);
            }

Thanks any way