Window DragEnter event on Mac

I don’t have a Mac to test this on and have not been successful in tinkering and having a Mac user test a few different ways I have attempted to resolve within my application. Any assistance you can offer would be greatly appreciated!!!

Here is what I’m trying to do:
User drags textfield from Window1 to Window2. As soon as the mouse enters Window2 bring Window2 to the front if it is behind other windows within the application.

This works great on Windows OS. Window2 immediately jumps on top of Window1 when the mouse enters during via the DragEnter event. On Mac OS the window2 remains behind window1, it’s almost as if the DragEnter event doesn’t fire

  1. Create two windows that open at startup of the project

  2. In Window1 create a textfield and add the following to the textfield mousedown event:
    dim d as dragItem
    d = new DragItem(self,me.left,,me.width,me.height)
    d.Text = me.text

  3. Add the DragEnter event to Window2 with the following:

With Window1 partially over Window2, dragging the textfield from Window1 over Window2 brings Window2 to the front on the Windows OS however Mac OS Window2 does not become the front window.


Bump, any advice is greatly appreciated!

I’ve tossed a quick dummy project here that can be used as example.


It may simply be that non front windows don’t get drag events on Mac. They certainly don’t come to the foreground automatically. Have you put a breakpoint in the drag enter event?

In Window2, add

Sub Open() me.AcceptTextDrop End Sub

Brilliant Michel!!! Such a simple solution but without having a Mac was really struggling to figure out how to get that to work the same as the Windows side of the world! Many thanks!