How can you track the mouse pointer if you leave the form......
-
Umm, is possible to track the mouse pointer if you move off the form, I have written an app that I needed to track the mouse pointer on the form. Now I am trying to track the mouse pointer out of the Form on the Windows back ground. I think I am having issues attaching the event handler < MouseHookProcedure = new HookProc(Form1.MouseHookProc); hHook = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProcedure, (IntPtr)0, 0); > dont appear to be setting hHook..... HELP:confused:
-
Umm, is possible to track the mouse pointer if you move off the form, I have written an app that I needed to track the mouse pointer on the form. Now I am trying to track the mouse pointer out of the Form on the Windows back ground. I think I am having issues attaching the event handler < MouseHookProcedure = new HookProc(Form1.MouseHookProc); hHook = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProcedure, (IntPtr)0, 0); > dont appear to be setting hHook..... HELP:confused:
Cursor.Position will retrieve current position of the cursor on the screen good luck
-
Umm, is possible to track the mouse pointer if you move off the form, I have written an app that I needed to track the mouse pointer on the form. Now I am trying to track the mouse pointer out of the Form on the Windows back ground. I think I am having issues attaching the event handler < MouseHookProcedure = new HookProc(Form1.MouseHookProc); hHook = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProcedure, (IntPtr)0, 0); > dont appear to be setting hHook..... HELP:confused:
I think http://www.freevbcode.com/ShowCode.asp?ID=2890[^] can help you.
-
Cursor.Position will retrieve current position of the cursor on the screen good luck
The simple answer, why oh why did I not think of that. Stick
label1.Text = Cursor.Position.ToString();
in a timer and off you go! -
I think http://www.freevbcode.com/ShowCode.asp?ID=2890[^] can help you.
Thanks, I will have a look at that Glenn
-
Umm, is possible to track the mouse pointer if you move off the form, I have written an app that I needed to track the mouse pointer on the form. Now I am trying to track the mouse pointer out of the Form on the Windows back ground. I think I am having issues attaching the event handler < MouseHookProcedure = new HookProc(Form1.MouseHookProc); hHook = SetWindowsHookEx(WH_MOUSE_LL, MouseHookProcedure, (IntPtr)0, 0); > dont appear to be setting hHook..... HELP:confused:
read up on
Mouse.Capture
:)Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.