Open Sk8ERxPiPE opened 3 years ago
Actually, looking further, the freezing is coming from a called function that does not freeze when I call from a key event...
Ok, so my issue is I detect a mouseDown then I want to as quickly as possible trigger another mouseDown using:
inp.mi.dwFlags = mouseButtonDown; SendInput(1, ref inp, Marshal.SizeOf(inp));
but there is about a 300ms freeze when I try to do this. Any recommendations on how to reduce it? When I read a keyboard input using WndProc messages, I don't have this freezing issue.
Aaaaand... the issue seems to have resolved itself. Well ok then, wish I could figure out why 😬
My application detects when a mouse button is pressed and triggers an event. There is a noticeable (~200ms?) freeze in the mouse movement when the mouse is clicked. I checked and the other parts of my program aren't causing lag. Is there a way to implement this with minimal (<10ms) freeze in the mouse response? I don't want the cursor to noticeably freeze in place when the user is using the application.
My code: public void Subscribe() { m_GlobalHook = Hook.GlobalEvents(); m_GlobalHook.MouseDown += M_GlobalHook_MouseDown; ; } private void M_GlobalHook_MouseDown(object sender, MouseEventArgs e) { do stuff ... }