How to disable Windows 7 feature that maximizes a window to full screen when moved to the edge of the screen (but keep keyboard shortcuts working)?

10

6

I followed this advice: How to disable auto-maximize/resize window (aero-snap) when near screen edge?

But it also turns off the feature where pressing WinKey + Left/Right Arrow, fit the windows to half of the screen on the direction of the arrow key.

Is there a way to control them independently?

Joan Venge

Posted 2012-06-27T11:47:23.733

Reputation: 1 134

I've been searching for the same solution and I believe it can't be done natively. How hard is it for Microsoft to let users customize these settings easily? – user – 2013-06-29T06:23:06.247

1Exactly too many trivial things are not possible. Why? Because MS has no idea about usability. Their latest xbox one shows it the best. And they expect people to pay absurd amounts for their software. – Joan Venge – 2013-06-29T11:25:30.357

Answers

3

Though there may not be a way to do this through a GUI there is a way to accomplish it programmatically.

The function you want is SystemParametersInfo. You can read about it on MSDN if you want it's full capability (it's can access an absurd number of settings) but you'll be interested in SPI_SETDOCKMOVING and SPI_SETSNAPSIZING.

SPI_SETDOCKMOVING toggles the ability to snap windows by dragging them by their title bars. You can turn it off like this:

SystemParametersInfo(SPI_SETDOCKMOVING, 0, NULL, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE)

SPI_SETSNAPSIZING toggles the ability to snap windows by sizing them using their top and bottom borders. You can turn it off like this:

SystemParametersInfo(SPI_SETSNAPSIZING, 0, NULL, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE)

To turn either back on just make the same call with a non-zero number for the second argument. To make the changes not persist after a reboot remove the SPIF_UPDATEINIFILE flag from the last argument.

To ensure you keep your keyboard shortcuts do not to turn AeroSnap off in the Control Panel or registry.

The diligent may notice that the arguments supplied here are not what you might expect them to be from the documentation. Specifically the pvParam and uiParams are switched. This is the only way I have found to make this function work on my machine (running Windows 8.1) so I suspect an error in the docs.

gitbox

Posted 2012-06-27T11:47:23.733

Reputation: 131

The result of executing this code with SPIF_UPDATEINIFILE set: https://superuser.com/a/1464761/128356 (makes it possible to just apply these edits in the registry).

– Duke Nukem – 2019-07-27T16:52:47.453

2

The following registry edit achieves exactly what was asked:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Control Panel\Desktop]
"DockMoving"="0"
"SnapSizing"="0"

(You can save this as a .reg file and run it. Restart or relogon required.)

Effectively, these are the two settings that would be set, executing the code in @gitbox's answer.

Works in Windows 7 - 10.

Duke Nukem

Posted 2012-06-27T11:47:23.733

Reputation: 865

2

I have looked for this in the past, and I do not believe there is a way to do this in Windows itself. However, there is a third-party alternative. First, disable the aero snap as per the link in your question. Then, using WindowsPad (a special AutoHotkey script setup) you can restore moving windows between screens in a multi-monitor setup, use left/right snapping, and more (top, bottom, middle and corner snapping). By default, WindowsPad uses Win + NumPad keys (because of the added functionality) but you can add in aero-snap-like arrow key functionality by adding the following to the [Hotkeys] section of the WindowsPad.ini file:

#+Left = WindowScreenMove, Next
#+Right = WindowScreenMove, Prev
#Left = WPM, -1,  0,  0.5, 1.0
#Right = WPM, +1,  0,  0.5, 1.0
#Up = MaximizeToggle
#Down = Restore

Unfortunately, you do lose the ability to snap to 50% of the screen and then restore to the original position (since it is actually resizing the window, not using aero snap). But so far, that is the only downside I have found.


Demo of WindowsPad's corner- and bottom-snap features:

WindowsPad Demo

techturtle

Posted 2012-06-27T11:47:23.733

Reputation: 8 059

2

You can try my windows tool collection. The following are hot keys to move windows:

Win+Array: Move the active window based on other visible windows. This allows for fast window alignment.
Shift+Win+Array: Move the left-up corner of the active window.
Alt+Win+Array: Move the right-bottom corner of the active window.
Ctrl+Win+Array: Dock the active window
Alt+F9: Minimize the active window
Alt+F10: Toggle maximize the active window

Jun 2015

Since Google code is being decommissioned, I moved the code to github. The wiki page has some help information: rwin wiki

Codism

Posted 2012-06-27T11:47:23.733

Reputation: 845

-1

You can do this in the registry.

  1. Open regedit.exe
  2. Navigate to HKEY_CURRENT_USER \Control Panel\Desktop
  3. Select the field WindowArrangementActive by double clicking it
  4. Set the value to 0
  5. Restart (logoff and back on may work)

Found from here http://www.technorms.com/33660/how-to-disable-the-windows-snap-feature

grgrssll

Posted 2012-06-27T11:47:23.733

Reputation: 1

This disables the keyboard shortcuts – Duke Nukem – 2019-07-27T16:49:57.740