开发者

Can Native Borders detect Mouse Move?

开发者 https://www.devze.com 2023-04-05 21:43 出处:网络
I was planning to make an app that can hide itself outside the top of the screen, and leave 3px (its bottom) in screen, when mouse entered the window, it should slide down and show itself.

I was planning to make an app that can hide itself outside the top of the screen, and leave 3px (its bottom) in screen, when mouse entered the window, it should slide down and show itself.

I did stage.NativeWindow.addEventListener(MouseEvent.MOUSE_MOVE, some_func), but the problem is when mouse is over the bottom of the NativeWindow ( which is an native window's border ), no MouseEvent is dispatched.

I know I can SystemChrome=false and make a MXML window,

or make the window down a little bit (3px is already too much) to expose it's swf content ,

but is there any other way to detect such kind of mouse movement 开发者_运维百科?


No. The native windows border is not actually a part of your application "working area", it is a part of Windows/Mac etc.

It's a long time since I used AS3, but if you could get the absolute position of the mouse (relative to the desktop), then you could trigger an event when the mouse is within the top 3 pixels.

0

精彩评论

暂无评论...
验证码 换一张
取 消