New topic: 

Mouse enter/exit event does not fire on window's bar

<http://forums.realsoftware.com/viewtopic.php?t=46002>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        DevMix          Post subject: Mouse enter/exit event does not 
fire on window's barPosted: Tue Nov 20, 2012 9:41 pm                         
Joined: Mon Oct 09, 2006 9:05 am
Posts: 134                The window's bar(20px) is not part of the window.

The mouse enter/exit event fires only below the bar.

Is there a way to get it ride when the mouse does enter/exit also the window's 
bar?

Thanks in advance.      
_________________
Working system: Mac OS X 10.6.x
_________________________________
Note : I am not interested in any solutions that need custom Plug-ins of any 
kind   
                             Top                mauitom          Post subject: 
Re: Mouse enter/exit event does not fire on window's barPosted: Tue Nov 20, 
2012 10:40 pm                                 
Joined: Thu Feb 16, 2006 10:04 pm
Posts: 244                Man, that's a funny request ... 

This is a bit of a hack, but should work. Have a timer, mode set to 0, in its' 
Action() event place this code.
Dim myWindow As Ptr = Ptr(Self.Handle)
Dim aPoint As NSPoint

Declare Function MouseLocation Lib "Cocoa" Selector 
"mouseLocationOutsideOfEventStream" (target As Ptr) As NSPoint
aPoint = MouseLocation(myWindow)

Add the Structure.
NSPoint
x As Single
y As Single

Now you have a point location. This is for Cocoa. You'll have to fool around 
with the "y" location, its' origin is bottom left. But once you get this point 
you can do a If statement and raise some sort of flag or your own event when 
the conditions are true.      
_________________
Thomas C.
Real Studio Blog
http://bigdaddysurf.com/blog/

http://itunes.apple.com/us/app/mrp-2012/id496160762?ls=1&mt=8
https://itunes.apple.com/us/book/how-to-waterstart/id576214730?mt=11  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to