How can I allow that users can drag my application to another monitor when it's maximized if they are using 2 monitors? The application needs to resize to fit the other monitor when the user has dragged it.

link|improve this question
What operating system / framework? – Georg Schölly Apr 21 '11 at 8:44
@georg it's tagged delphi – David Heffernan Apr 21 '11 at 8:47
1  
@Marijin: In Windows 7, a maximized window can be dragged. In addition, if you, while dragging a window, position the cursor near the top of any monitor, the window will be maximized on that monitor. I have two monitors, and I regularly move maximized windows from one monitor to the other in a single movement of the mouse. – Andreas Rejbrand Apr 21 '11 at 11:52
1  
I'm a little confused as to why this was migrated. If I had enough rep here I'd vote to move it back to SO! – David Heffernan Apr 24 '11 at 19:18
1  
This is most certainly a Stack Overflow question. I'm voting to move it back right now. – CarlF Apr 25 '11 at 15:42
show 5 more comments
feedback

migrated from stackoverflow.com Apr 23 '11 at 8:24

This question came from our site for professional and enthusiast programmers.

closed as off topic by random Jun 13 '11 at 1:10

Questions on Super User are expected to generally relate to computer software or computer hardware, within the scope defined in the faq.

2 Answers

On most versions of Windows, maximised windows cannot be dragged. You have to normalise, drag and then maximise.

In Windows 7 you can use the Windows + shift + arrow keys to move maximised windows to other monitors. They resize automatically.

On older systems you could consider adding items to the system menu to offer such functionality but I would not recommend it since this really is a job for the system's window manager rather than individual apps.

link|improve this answer
oke but how can i when i finished the drag resize the form to fullscreen again? – Marijn van de Sande Apr 21 '11 at 9:02
1  
users drag so you should let the user maximise – David Heffernan Apr 21 '11 at 9:10
3  
In Windows 7, maximized windows can be dragged. – Andreas Rejbrand Apr 21 '11 at 11:29
1  
@David: Yes, it is. – Andreas Rejbrand Apr 21 '11 at 11:36
2  
In Windows 7, dragging to the top of the screen maximizes. Dragging away restores. Dragging to either side of the screen resizes the window to take up that half of the screen. Dragging and shaking a window back and forth minimizes all other windows. Too bad they're all controlled by a single setting; I'd like to have the draggable maximized windows, but could do without the other features. I think the keyboard shortcut might be controlled by that, too, since it's not working for me right now. – Rob Kennedy Apr 21 '11 at 14:29
show 8 more comments
feedback

If I'm not mistaken, Marijn is asking this question from the perspective of a developer (i.e. "Do I need to modify my program to allow users to drag the program's window, if maximised, between monitors?") not from the perspective of a user ("Can I drag maximised windows between monitors?").

Marijn, I don't believe you need to modify your program. Windows itself will handle the matter of letting your program's window be dragged between monitors. Some versions of Windows, e.g. XP, might not allow that to happen while the window is maximised, but this is in keeping with the UI norms on those versions of Windows and therefore will fit user expectations.

Be happy: you can relax :)

link|improve this answer
1  
You're right. This question should not have been moved here to Super User. Although the answer is to recommend no additional programming, it's still a programming question. – Rob Kennedy Apr 25 '11 at 14:26
feedback