views:

157

answers:

1

In my .Net application, the user can drag rows from a grid on a main window into other application windows. Often the main application window is behind the window that the user is dragging into. By default, as soon as the mouse button is depressed on the main window, it gains focus, hiding the window that the user wants to drag onto.

Is there any way to prevent the active window from changing? It is awkward for a user to position the windows such that they can both drag from the main window onto the appropriate element of the active window.

Note that Windows Explorer handles this fine - the foreground Explorer window remains active in case the user wants to drag into it, until the mouse button is released.

A: 

It might make sense to make your application an MDI (multi document interface) application (like VisualStudio, Word, Excel, etc) where you have a "main" window which contains all the other windows separated by panes.

Zach Johnson