Triggering MouseEnter while app in background?

I would like to activate my app when in the background by triggering it’s MouseEnter event to bring it forward, is this possible?

I found this but the zip file is corrupted:
https://forum.xojo.com/8055-need-to-get-mouse-move-events-in-background-solution-here

Try with a different unzip app. Or have a look at the MBS plugin.

Mac or Windows ?

I downloaded “The unarchiver” & it didn’t work either.

Both would be good if possible, I’m working on the Mac version now & hopefully I’ll get to the Windows port later on.

Thanks

It’s not you… This is what is inside of the files you download

[quote]

404 Not Found

Not Found

The requested URL /files/FIXT2T/Mouse_movement_in_background_with_CanvasBGT.rbp.zip was not found on this server.

[/quote]

Use a timer with a period of 17 (which equates approximately to one tick) which monitors System.MouseX and System.MouseY. When the mouse crosses the edge of the window, use this to bring the app to the front :

declare function NSClassFromString lib "Cocoa" ( inName as CFStringRef ) as Ptr declare function sharedApplication lib "Cocoa" selector "sharedApplication" ( classRef as Ptr ) as Ptr Dim myApplication as Ptr = sharedApplication( NSClassFromString( "NSApplication" ) ) declare sub activateIgnoringOtherApps lib "Cocoa" selector "activateIgnoringOtherApps:" ( appRef as Ptr, flag as boolean ) activateIgnoringOtherApps( myApplication, True ) me.AcceptFocus = True me.UseFocusRing = True me.SetFocus

I picked up that code from a post of Axel Schneider.