FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Capturing Mouse movements outside a form

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
zane.sims



Joined: 07 Aug 2007
Posts: 40

PostPosted: Fri Mar 07, 2008 1:30 pm    Post subject: Capturing Mouse movements outside a form Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Mar 14, 2008 2:48 pm    Post subject: Re: Capturing Mouse movements outside a form Reply with quote

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
View user's profile Send private message
zane.sims



Joined: 07 Aug 2007
Posts: 40

PostPosted: Fri Mar 14, 2008 3:49 pm    Post subject: About the Mouse Hook Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Mar 14, 2008 4:50 pm    Post subject: Re: About the Mouse Hook Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group