View previous topic :: View next topic |
Author |
Message |
zane.sims
Joined: 07 Aug 2007 Posts: 40
|
Posted: Fri Mar 07, 2008 1:30 pm Post subject: Capturing Mouse movements outside a form |
|
|
Hello,
My first attempt was assigning a mouseMove event handler, but that only worked inside the form. How can my application determine when the mouse is moved, clicked, etc. whether or not the cursor is inside the bounds of a form?
Thanks in advance,
Zane _________________ わたしがプログラマだよ! |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Mar 14, 2008 2:48 pm Post subject: Re: Capturing Mouse movements outside a form |
|
|
Cursor.position lets you get the current position, using Control.capture=true lets you get mouse move events outside your control as long as the mouse isn't intended for some other window or control. If you need more than this, you might need to use a mouse hook. |
|
Back to top |
|
|
zane.sims
Joined: 07 Aug 2007 Posts: 40
|
Posted: Fri Mar 14, 2008 3:49 pm Post subject: About the Mouse Hook |
|
|
Thank you very much for your interest in my question. I need to capture ALL mouse events regardless of the control, form, or application. I believe what I need is in fact a mouse hook but I don't know how to go about this. I don't want to revert to some very in-depth win32 programming as that is the reason I am using DFL in the first place. Is there a simple way to get a "mouse hook", and how is it done? This question is open to anyone.
Thanks,
Zane _________________ わたしがプログラマだよ! |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Mar 14, 2008 4:50 pm Post subject: Re: About the Mouse Hook |
|
|
I would say hooks are outside the scope of DFL, sorry.
Windws hooks: SetWindowsHookEx
I'm sure there are many examples on the internets. |
|
Back to top |
|
|
|