Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an
HookMouseCallback(int nCode, IntPtr wParam, IntPtr lParam)

How do I use these out params in
UINT SendInput(
  [in] UINT    cInputs,
  [in] LPINPUT pInputs,
  [in] int     cbSize
);

I am also planning on doing this for keystrokes, but Im not sure how to.

What I have tried:

Well originally I wasn't using SendInput, I was using PostMessage or something, but it didn't give me the desired affect.

I think I want to use
HARDWAREINPUT
What the best way to do this?
Edit just found out HARDWAREINPUT isn't supported, what do I use now? I want to send it as the two params or at least from them.

I am trying to make a macro recorder, but I want more control over the outputs.
Posted
Updated 26-Apr-24 14:56pm
v4

1 solution

I asked Google C# capture mouse[^] and found this: Capture or Detect mouse click on or outside Windows Form using C#.NET[^]

UPDATE

Let us change the Google Search: c# movemouse[^] - there are 126,000+ results. The first result has a couple of different approaches: How to move mouse cursor using C#? - solved[^]
 
Share this answer
 
v2
Comments
G Schulz 27-Apr-24 12:35pm    
Thanks for the response!
My problem isn't capturing it, it is that I'm not sure how to resend it. How should I do that?
Graeme_Grant 27-Apr-24 16:38pm    
See my updated answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900