{"id":951,"date":"2013-07-16T23:25:50","date_gmt":"2013-07-16T21:25:50","guid":{"rendered":"http:\/\/michlstechblog.info\/blog\/?p=951"},"modified":"2022-01-20T21:22:43","modified_gmt":"2022-01-20T20:22:43","slug":"windows-disable-aerosnap-automatically-window-arranging-and-resizing-while-dragging","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-disable-aerosnap-automatically-window-arranging-and-resizing-while-dragging\/","title":{"rendered":"Windows: Disable automatic Window arranging and resizing while dragging with the mouse (AeroSnap)"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_951 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_951')){$('.twoclick_social_bookmarks_post_951').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Disable%20automatic%20Window%20arranging%20and%20resizing%20while%20dragging%20with%20the%20mouse%20%28AeroSnap%29\",\"the_excerpt\":\"Sometimes%20the%20Windows%207%20functionality%20to%20automatically%20arrange%20or%20resize%20a%20window%20while%20dragging%20is%20a%20pain.%20This%20feature%20is%20called%20Aero%20Snap.%20Here%20are%20good%20news%2C%20you%20can%20disable%20the%20behaviour%20%3A-%29.%0D%0A%0D%0AOpen%20the%20Control%20Panel%2C%20go%20to%20%22Ease%20of%20Access%20center%22.%20If%20you%20are%20there%2C%20click%20%22Make%20the%20mouse%20easier%20to%20use%22%20and%20enable%20%22Prevent%20Windows%20from%20being%20automatically%20arranged%20when%20moved%20to%20the%20edge%20o%20...\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-disable-aerosnap-automatically-window-arranging-and-resizing-while-dragging\\\/\",\"post_id\":951,\"post_title_referrer_track\":\"Windows%3A+Disable+automatic+Window+arranging+and+resizing+while+dragging+with+the+mouse+%28AeroSnap%29\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Sometimes the Windows 7 functionality to automatically arrange or resize a window while dragging is a pain. This feature is called Aero Snap. Here are good news, you can disable the behaviour :-).<\/p>\n<p>Open the Control Panel, go to &#8220;Ease of Access center&#8221;. If you are there, click &#8220;Make the mouse easier to use&#8221; and enable &#8220;Prevent Windows from being automatically arranged when moved to the edge of the screen&#8221;.<\/p>\n<figure id=\"attachment_958\" aria-describedby=\"caption-attachment-958\" style=\"width: 424px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapMouse.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-958\" title=\"Mouse Settings\" alt=\"\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapMouse.png\" width=\"424\" height=\"313\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapMouse.png 424w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapMouse-300x221.png 300w\" sizes=\"auto, (max-width: 424px) 100vw, 424px\" \/><\/a><figcaption id=\"caption-attachment-958\" class=\"wp-caption-text\">Mouse Settings<\/figcaption><\/figure>\n<p><!--more--><\/p>\n<figure id=\"attachment_959\" aria-describedby=\"caption-attachment-959\" style=\"width: 606px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapDisable.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-959\" title=\"Disable Aero Snap\" alt=\"\" src=\"http:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapDisable.png\" width=\"606\" height=\"487\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapDisable.png 758w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2013\/07\/AeroSnapDisable-300x241.png 300w\" sizes=\"auto, (max-width: 606px) 100vw, 606px\" \/><\/a><figcaption id=\"caption-attachment-959\" class=\"wp-caption-text\">Disable Aero Snap<\/figcaption><\/figure>\n<p>Or do it with the powershell script below :-). The script calls the windows API function SystemInfoNonRef from User32.dll. Adjust $iSetDisable to alter the setting as you want. This script is also an example how to call Windows API functions from Powershell.<\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\n###############################################################################\r\n# Disables the Windows AeroSnap Feature\r\n# created:\r\n# Michael Albert\r\n# 07\/17\/2013\r\n# info@michlstechblog.info\r\n# License: GPLv2\r\n# References:\r\n# http:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms724947%28v=vs.85%29.aspx#Time-out\r\n# http:\/\/blogs.technet.com\/b\/stefan_gossner\/archive\/2010\/05\/07\/using-csharp-c-code-in-powershell-scripts.aspx\r\n# http:\/\/msdn.microsoft.com\/de-de\/library\/cc431203.aspx\r\n###############################################################################\r\n\r\n# Using C# to Call the WinAPI\r\n$sCSSource=@\"\r\n\tusing System.Runtime.InteropServices;\r\n\tnamespace info.michlstechblog\r\n\t{\r\n\t    public class apicall\r\n\t    {\r\n\t        public static bool SystemInfoByRef(uint iAction, uint iParameter, ref uint pParameter, uint iWinIni)\r\n\t        {\r\n\t            return SystemParametersInfo(iAction, iParameter, ref pParameter, iWinIni);\r\n\t        }\r\n\r\n\t        public static bool SystemInfoNonRef(uint iAction, uint iParameter, uint pParameter, uint iWinIni)\r\n\t        {\r\n\t            return SystemParametersInfo(iAction, iParameter, pParameter, iWinIni);\r\n\t        }\r\n\r\n\t        &#x5B;DllImport(\"User32.dll\")]\r\n\t        private static extern bool SystemParametersInfo(uint iAction, uint iParameter, ref uint pParameter, uint iWinIni);\r\n\r\n\t        &#x5B;DllImport(\"User32.dll\")]\r\n\t        private static extern bool SystemParametersInfo(uint iAction, uint iParameter, uint pParameter, uint iWinIni);\r\n\t    }\r\n\t}\r\n\"@\r\nAdd-Type -ReferencedAssemblies $Assem -TypeDefinition $sCSSource -Language CSharp\r\n# Get Current Setting\r\n# SPI_GETWINARRANGING 0x0082\r\n$bCurrentState=0\r\nIf(&#x5B;info.michlstechblog.apicall]::SystemInfoByRef(0x0082, 0, (&#x5B;REF]$bCurrentState), 0)){\r\n\twrite-host -NoNewline (\"\"\"Prevent Windows from being automatically arranged when moved to the edge of the screen\"\" is \")\r\n\tif($bCurrentState -eq 0){\r\n\t\twrite-host \"enabled\"\r\n\t}\r\n\telseif($bCurrentState -eq 1){\r\n\t\twrite-host \"disabled\"\r\n\t}\r\n\telse{\r\n\t\twrite-host \"in unknown state\"\r\n\t}\r\n}\r\nelse{\r\n\tWrite-Warning \" Can't get setting \"\"Prevent Windows from being automatically arranged when moved to the edge of the screen\"\"\"\r\n}\r\n# Enable \"Prevent Windows from being automatically arranged when moved to the edge of the screen\"\r\n# SPI_SETWINARRANGING = 0x0083\r\n# SPI_SETWINARRANGING , SPI_SETDOCKMOVING\r\n# In the SPI_SETWINARRANGING and SPI_SETDOCKMOVING description, the parameter used to set the value is uiParam, not pvParam.\r\n# Parameter is negative\r\n$iSetDisable=0\r\nif(&#x5B;info.michlstechblog.apicall]::SystemInfoNonRef(0x0083, $iSetDisable, 0, 1)){\r\n\twrite-host (\"Set \"\"Prevent Windows from being automatically arranged when moved to the edge of the screen\"\" to enabled \")\r\n}\r\nelse{\r\n\tWrite-Warning \" Can't set \"\"Prevent Windows from being automatically arranged when moved to the edge of the screen\"\"\"\r\n}\r\n<\/pre>\n<p>Have fun.<br \/>\nMichael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes the Windows 7 functionality to automatically arrange or resize a window while dragging is a pain. This feature is called Aero Snap. Here are good news, you can disable the behaviour :-). Open the Control Panel, go to &#8220;Ease of Access center&#8221;. If you are there, click &#8220;Make the mouse easier to use&#8221; and &hellip; <a href=\"https:\/\/michlstechblog.info\/blog\/windows-disable-aerosnap-automatically-window-arranging-and-resizing-while-dragging\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Windows: Disable automatic Window arranging and resizing while dragging with the mouse (AeroSnap)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,4],"tags":[237,239,241,243,860,62,238,240,133,242,20],"class_list":["post-951","post","type-post","status-publish","format-standard","hentry","category-windowsknowhow","category-windowsscripts","tag-aero-snap","tag-api","tag-arrange","tag-automatically","tag-c","tag-disable","tag-dllimport","tag-drag","tag-powershell","tag-window","tag-windows-2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=951"}],"version-history":[{"count":22,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/951\/revisions"}],"predecessor-version":[{"id":8355,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/951\/revisions\/8355"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}