<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=Moving_and_Resizing_PopUp_GUIs</id>
	<title>Moving and Resizing PopUp GUIs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=Moving_and_Resizing_PopUp_GUIs"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;action=history"/>
	<updated>2026-04-06T19:36:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=12951&amp;oldid=prev</id>
		<title>Melba23 at 11:40, 18 April 2015</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=12951&amp;oldid=prev"/>
		<updated>2015-04-18T11:40:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:40, 18 April 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l315&quot;&gt;Line 315:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 315:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Func _Check_Border()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Func _Check_Border()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aCurInfo = GUIGetCursorInfo()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aCurInfo = GUIGetCursorInfo()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     If @error Then Return -1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aWinPos = WinGetPos($hGUI)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aWinPos = WinGetPos($hGUI)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $iSide = 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $iSide = 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l402&quot;&gt;Line 402:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 403:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Func _GetBorder()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  Func _GetBorder()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aCurInfo = GUIGetCursorInfo()&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aCurInfo = GUIGetCursorInfo()&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;     If @error Then Return -1&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aWinPos = WinGetPos($hGUI)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $aWinPos = WinGetPos($hGUI)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $iSide = 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      Local $iSide = 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Melba23</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11838&amp;oldid=prev</id>
		<title>Jaberwocky6669: /* Method 3: Sending the $WM_NCLBUTTONDOWN message */</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11838&amp;oldid=prev"/>
		<updated>2013-08-15T18:29:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Method 3: Sending the $WM_NCLBUTTONDOWN message&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:29, 15 August 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l119&quot;&gt;Line 119:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 119:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  EndFunc   ;==&amp;gt;On_Button&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  EndFunc   ;==&amp;gt;On_Button&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;Note&#039;&#039;:  The remainder of this tutorial assumes knowledge of the &#039;&#039;GUIRegisterMsg&#039;&#039; command.  If you are not clear on the use of this command, please read the [[GUIRegisterMsg]] tutorial before continuing.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&#039;&#039;Note&#039;&#039;:  The remainder of this tutorial assumes knowledge of the &#039;&#039;GUIRegisterMsg&#039;&#039; command.  If you are not clear on the use of this command, please read the [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tutorial GUIRegisterMsg|&lt;/ins&gt;GUIRegisterMsg]] tutorial before continuing.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Method 4: Handling the $WM_NCHITTEST message==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Method 4: Handling the $WM_NCHITTEST message==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11364&amp;oldid=prev</id>
		<title>IEvKI3gv9Wrkd41u: +Category:Tutorials</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11364&amp;oldid=prev"/>
		<updated>2012-11-14T14:33:08Z</updated>

		<summary type="html">&lt;p&gt;+Category:Tutorials&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:33, 14 November 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Tutorials]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Introduction=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Introduction=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>IEvKI3gv9Wrkd41u</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11038&amp;oldid=prev</id>
		<title>Jaberwocky6669: Added wiki headers, cleaned up minor typos</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=11038&amp;oldid=prev"/>
		<updated>2012-11-11T13:30:40Z</updated>

		<summary type="html">&lt;p&gt;Added wiki headers, cleaned up minor typos&lt;/p&gt;
&lt;a href=&quot;https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;amp;diff=11038&amp;amp;oldid=10832&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Jaberwocky6669</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=10832&amp;oldid=prev</id>
		<title>Rt01 at 20:40, 25 October 2012</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=Moving_and_Resizing_PopUp_GUIs&amp;diff=10832&amp;oldid=prev"/>
		<updated>2012-10-25T20:40:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Many Autoit coders would like to use the &amp;#039;&amp;#039;$WS_POPUP&amp;#039;&amp;#039; style for a GUI but do not when they find that they can no longer move or resize the GUI because it has no title bar or borders to grab.  Here are 4 ways to move a &amp;#039;&amp;#039;$WS_POPUP&amp;#039;&amp;#039; GUI with the mouse as well as a way to resize it.&lt;br /&gt;
&lt;br /&gt;
Note:  I have garnered these methods from various places on the forum and I am afraid I do not remember all the original authors of the code in this tutorial.  If you see your uncredited code here, please add your own credit line!&lt;br /&gt;
&lt;br /&gt;
[[Moving a $WS_POPUP GUI]]&lt;br /&gt;
&lt;br /&gt;
The 4 methods have, as you would expect, advantages and diadvantages.  Some are easier to use than others - some have side-effects on the GUI, others do not.  Try them all and then decide which is best for your particular script.&lt;br /&gt;
&lt;br /&gt;
For all examples, the green area shows where dragging is possible and the red area (if there is one) where it is not; clicking the button will bring up a message box; and pressing &amp;quot;&amp;#039;&amp;#039;Escape&amp;#039;&amp;#039;&amp;quot; always exits the script.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Method 1&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;$GUI_WS_EX_PARENTDRAG&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This method uses a label on the GUI to act as a drag anchor.  It is easy to set up, but as the label must be active, you can run into overlap problems with other controls - just try clicking on the top half of the button or see what happens when you try to drag the GUI when the button does not fire!  If you disable the label, you will see that the button works normally but you can no longer drag the GUI.  So although this is the simplest method, it is the least satisfactory - although it can be useful in certain cases.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GuiconstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;X&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0xFF0000, $hGUI)&lt;br /&gt;
 $hLabel = GUICtrlCreateLabel(&amp;quot;&amp;quot;, 0, 0, 100, 50, -1, $GUI_WS_EX_PARENTDRAG)&lt;br /&gt;
 GUICtrlSetBkColor(-1, 0x00FF00)&lt;br /&gt;
 ;GUICtrlSetState(-1, $GUI_DISABLE)&lt;br /&gt;
 $hButton = GUICtrlCreateButton(&amp;quot;Test&amp;quot;, 10, 35, 80, 30)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Switch GUIGetMsg()&lt;br /&gt;
         Case $hButton&lt;br /&gt;
             On_Button()&lt;br /&gt;
     EndSwitch&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 Func On_Button()&lt;br /&gt;
     MsgBox(0, &amp;quot;Hi&amp;quot;, &amp;quot;Button Pressed&amp;quot;)&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Button&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;#039;&amp;#039;Method 2&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;Sending the $SC_DRAGMOVE message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Here we send a message when the primary mouse button is pressed to tell Windows to drag the GUI with the mouse.  Note that the button works without problem.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 ; Original code - martin&lt;br /&gt;
 #include &amp;lt;GuiconstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Global Const $SC_DRAGMOVE = 0xF012&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;X&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0x00FF00, $hGUI)&lt;br /&gt;
 $hButton = GUICtrlCreateButton(&amp;quot;Test&amp;quot;, 10, 35, 80, 30)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Switch GUIGetMsg()&lt;br /&gt;
         Case $GUI_EVENT_PRIMARYDOWN&lt;br /&gt;
             _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)&lt;br /&gt;
         Case $hButton&lt;br /&gt;
             On_Button()&lt;br /&gt;
     EndSwitch&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 Func On_Button()&lt;br /&gt;
     MsgBox(0, &amp;quot;Hi&amp;quot;, &amp;quot;Button Pressed&amp;quot;)&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Button&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;#039;&amp;#039;Method 3&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;Sending the &amp;#039;&amp;#039;$WM_NCLBUTTONDOWN&amp;#039;&amp;#039; message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
In this example, we also detect when the primary mouse button is down.  We then fool Windows into believing that the cursor is not in the client area of the GUI but is actually in the title bar - Windows reacts as we hoped by dragging the GUI.  Again the button works without problem as Windows realises it is a control.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GuiconstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;X&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0x00FF00, $hGUI)&lt;br /&gt;
 $hButton = GUICtrlCreateButton(&amp;quot;Test&amp;quot;, 10, 35, 80, 30)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Switch GUIGetMsg()&lt;br /&gt;
         Case $GUI_EVENT_PRIMARYDOWN&lt;br /&gt;
             On_Drag()&lt;br /&gt;
         Case $hButton&lt;br /&gt;
             On_Button()&lt;br /&gt;
     EndSwitch&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 Func On_Drag()&lt;br /&gt;
     Local $aCurInfo = GUIGetCursorInfo($hGUI)&lt;br /&gt;
     If $aCurInfo[4] = 0 Then ; Mouse not over a control&lt;br /&gt;
         DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;ReleaseCapture&amp;quot;)&lt;br /&gt;
         _SendMessage($hGUI, $WM_NCLBUTTONDOWN, $HTCAPTION, 0)&lt;br /&gt;
     EndIf&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Drag&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Exit&lt;br /&gt;
 &lt;br /&gt;
 Func On_Button()&lt;br /&gt;
      MsgBox(0, &amp;quot;Hi&amp;quot;, &amp;quot;Button Pressed&amp;quot;)&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Button&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note&amp;#039;&amp;#039;&amp;#039;:  The remainder of this tutorial assumes knowledge of the &amp;#039;&amp;#039;GUIRegisterMsg&amp;#039;&amp;#039; command.  If you are not clear on the use of this command, please read the [[GUIRegisterMsg]] tutorial before continuing.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Method 4&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;Handling the $WM_NCHITTEST message&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This final method intercepts the &amp;#039;&amp;#039;$WM_NCHITTEST&amp;#039;&amp;#039; message, which basically tells Windows what part of the GUI is under the mouse when a button is pressed.  If the mouse is over the title bar, then Windows will drag the GUI.  In this script we tell Windows that the top half of the GUI is a title bar and so would Windows please drag as normal.  The coloured label is just there to differentiate between the 2 areas and has been disabled so as not to interfere with the button - which works normally as Windows realises it is a control and not part of the GUI.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GuiconstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;WindowsConstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;X&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0x00FF00, $hGUI)&lt;br /&gt;
 GUICtrlCreateLabel(&amp;quot;&amp;quot;, 0, 50, 100, 50)&lt;br /&gt;
 GUICtrlSetBkColor(-1, 0xFF0000)&lt;br /&gt;
 GUICtrlSetState(-1, $GUI_DISABLE)&lt;br /&gt;
 $hButton = GUICtrlCreateButton(&amp;quot;Test&amp;quot;, 10, 35, 80, 30)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 GUIRegisterMsg($WM_NCHITTEST, &amp;quot;_MY_NCHITTEST&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Switch GUIGetMsg()&lt;br /&gt;
         Case $hButton&lt;br /&gt;
             On_Button()&lt;br /&gt;
     EndSwitch&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 ; Original code - Prog@ndy&lt;br /&gt;
 Func _MY_NCHITTEST($hWnd, $uMsg, $wParam, $lParam)&lt;br /&gt;
     Switch $hWnd&lt;br /&gt;
         Case $hGUI&lt;br /&gt;
             Local $aPos = WinGetPos($hWnd) ; Check if mouse is over top 50 pixels&lt;br /&gt;
             If Abs(BitAND(BitShift($lParam, 16), 0xFFFF) - $aPos[1]) &amp;lt; 50 Then Return $HTCAPTION&lt;br /&gt;
     EndSwitch&lt;br /&gt;
     Return $GUI_RUNDEFMSG&lt;br /&gt;
 EndFunc   ;==&amp;gt;_MY_NCHITTEST&lt;br /&gt;
 &lt;br /&gt;
 Func On_Button()&lt;br /&gt;
     MsgBox(0, &amp;quot;Hi&amp;quot;, &amp;quot;Button Pressed&amp;quot;)&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Button&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc   ;==&amp;gt;On_Exit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
[[Resizing a $WS_POPUP GUI]]&lt;br /&gt;
&lt;br /&gt;
To resize a GUI without borders, we have to fool Windows into thinking that the borders actually exist.  We do this by telling Windows to change the cursor to the &amp;quot;&amp;#039;&amp;#039;resize&amp;#039;&amp;#039;&amp;quot; type if the mouse is placed over the margin of the GUI.  Then when primary mouse button is pressed, we check if the cursor has been changed and, if it has, tell Windows to resize the GUI.&lt;br /&gt;
&lt;br /&gt;
The various message handlers interact as follows:&lt;br /&gt;
&lt;br /&gt;
When we receive a &amp;#039;&amp;#039;$WM_MOUSEMOVE&amp;#039;&amp;#039; message, we check if the mouse is over a border by calling the &amp;#039;&amp;#039;_Check_Border&amp;#039;&amp;#039; function, which returns a code to indicate which cursor type is required, and then using that return to set the correct cursor type within the &amp;#039;&amp;#039; _SetCursor&amp;#039;&amp;#039; function.&lt;br /&gt;
&lt;br /&gt;
Then if a &amp;#039;&amp;#039;$WM_LBUTTONDOWN&amp;#039;&amp;#039; message is received we again check the &amp;#039;&amp;#039;_Check_Border&amp;#039;&amp;#039; function and, if we are over a border, tell Windows to resize the GUI as the mouse is dragged.&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 ; Original code - martin&lt;br /&gt;
 #include &amp;lt;GuiConstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;Windowsconstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 ; Set distance from edge of window where resizing is possible&lt;br /&gt;
 Global Const $iMargin = 4&lt;br /&gt;
 &lt;br /&gt;
 ; Create GUI&lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;Y&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0xFF0000)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 ; Register message handlers&lt;br /&gt;
 GUIRegisterMsg($WM_LBUTTONDOWN, &amp;quot;_WM_LBUTTONDOWN&amp;quot;)     ; For resize&lt;br /&gt;
 GUIRegisterMsg($WM_MOUSEMOVE, &amp;quot;_SetCursor&amp;quot;)            ; For cursor type change&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Sleep(10)&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 ; Check cursor type and resize/drag window as required&lt;br /&gt;
 Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     Local $iCursorType = _GetBorder()&lt;br /&gt;
     If $iCursorType &amp;gt; 0 Then ; Cursor is set to resizing style&lt;br /&gt;
         $iResizeType = 0xF000 + $iCursorType&lt;br /&gt;
         _SendMessage($hGUI, $WM_SYSCOMMAND, $iResizeType, 0)&lt;br /&gt;
     EndIf&lt;br /&gt;
 EndFunc ;==&amp;gt;WM_LBUTTONDOWN&lt;br /&gt;
 &lt;br /&gt;
 ; Set cursor to correct resizing form if mouse is over a border&lt;br /&gt;
 Func _SetCursor()&lt;br /&gt;
     Local $iCursorID&lt;br /&gt;
     Switch _GetBorder()&lt;br /&gt;
         Case 0&lt;br /&gt;
             $iCursorID = 2&lt;br /&gt;
         Case 1, 2&lt;br /&gt;
             $iCursorID = 13&lt;br /&gt;
         Case 3, 6&lt;br /&gt;
             $iCursorID = 11&lt;br /&gt;
         Case 5, 7&lt;br /&gt;
             $iCursorID = 10&lt;br /&gt;
         Case 4, 8&lt;br /&gt;
             $iCursorID = 12&lt;br /&gt;
     EndSwitch&lt;br /&gt;
     GUISetCursor($iCursorID, 1)&lt;br /&gt;
 EndFunc ;==&amp;gt;SetCursor&lt;br /&gt;
 &lt;br /&gt;
 ; Determines if mouse cursor over a border&lt;br /&gt;
 Func _GetBorder()&lt;br /&gt;
     Local $aCurInfo = GUIGetCursorInfo()&lt;br /&gt;
     Local $aWinPos = WinGetPos($hGUI)&lt;br /&gt;
     Local $iSide = 0&lt;br /&gt;
     Local $iTopBot = 0&lt;br /&gt;
     If $aCurInfo[0] &amp;lt; $iMargin Then $iSide = 1&lt;br /&gt;
     If $aCurInfo[0] &amp;gt; $aWinPos[2] - $iMargin Then $iSide = 2&lt;br /&gt;
     If $aCurInfo[1] &amp;lt; $iMargin Then $iTopBot = 3&lt;br /&gt;
     If $aCurInfo[1] &amp;gt; $aWinPos[3] - $iMargin Then $iTopBot = 6&lt;br /&gt;
     Return $iSide + $iTopBot&lt;br /&gt;
 EndFunc ;==&amp;gt;_GetBorder&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
 	Exit&lt;br /&gt;
 EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
[[Moving and resizing a $WS_POPUP GUI]]&lt;br /&gt;
&lt;br /&gt;
Of the 3 serious methods for dragging a &amp;#039;&amp;#039;$WS_POPUP&amp;#039;&amp;#039; GUI, only 2 can be combined with the resize code.  The &amp;#039;&amp;#039;$WM_NCHITTEST&amp;#039;&amp;#039; message version is unsuitable as it prevents the detection of the simulated borders.  The other 2 methods both use the &amp;#039;&amp;#039;$GUI_EVENT_PRIMARYDOWN&amp;#039;&amp;#039; message within the &amp;#039;&amp;#039;GUIGetMsg&amp;#039;&amp;#039; loop to detect the primary mouse button being pressed, but we could also use the &amp;#039;&amp;#039;$WM_LBUTTONDOWN&amp;#039;&amp;#039; message we use when resizing the GUI to do the same thing.  All we need to do is to check the cursor position and so the required cursor type: if it is greater than 0 we have a resize cursor - if it is 0 then we have a normal cursor and should drag the whole GUI.&lt;br /&gt;
&lt;br /&gt;
As an &amp;#039;&amp;#039;&amp;#039;added bonus&amp;#039;&amp;#039;&amp;#039; because you have been kind enough to read until there, the following examples also show how to set the maximum and minimum size of a resizable GUI via the &amp;#039;&amp;#039;$WM_GETMINMAXINFO&amp;#039;&amp;#039; message.  We simply make sure we set our own limits every time Windows checks to see when it should stop resizing.&lt;br /&gt;
&lt;br /&gt;
So here are the 2 scripts - first using the &amp;#039;&amp;#039;$SC_DRAGMOVE&amp;#039;&amp;#039; message&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GuiConstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;Windowsconstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 Global Const $SC_DRAGMOVE = 0xF012&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 ; Set distance from edge of window where resizing is possible&lt;br /&gt;
 Global Const $iMargin = 4&lt;br /&gt;
 ; Set max and min GUI sizes&lt;br /&gt;
 Global Const $iGUIMinX = 50, $iGUIMinY = 50, $iGUIMaxX = 300, $iGUIMaxY = 300&lt;br /&gt;
 &lt;br /&gt;
 ; Create GUI&lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;Y&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0x00FF00)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 ; Register message handlers&lt;br /&gt;
 GUIRegisterMsg($WM_MOUSEMOVE, &amp;quot;_SetCursor&amp;quot;)            ; For cursor type change&lt;br /&gt;
 GUIRegisterMsg($WM_LBUTTONDOWN, &amp;quot;_WM_LBUTTONDOWN&amp;quot;)     ; For resize/drag&lt;br /&gt;
 GUIRegisterMsg($WM_GETMINMAXINFO, &amp;quot;_WM_GETMINMAXINFO&amp;quot;) ; For GUI size limits&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Sleep(10)&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 ; Set cursor to correct resizing form if mouse is over a border&lt;br /&gt;
 Func _SetCursor()&lt;br /&gt;
     Local $iCursorID&lt;br /&gt;
     Switch _Check_Border()&lt;br /&gt;
         Case 0&lt;br /&gt;
             $iCursorID = 2&lt;br /&gt;
         Case 1, 2&lt;br /&gt;
             $iCursorID = 13&lt;br /&gt;
         Case 3, 6&lt;br /&gt;
             $iCursorID = 11&lt;br /&gt;
         Case 5, 7&lt;br /&gt;
             $iCursorID = 10&lt;br /&gt;
         Case 4, 8&lt;br /&gt;
             $iCursorID = 12&lt;br /&gt;
     EndSwitch&lt;br /&gt;
     GUISetCursor($iCursorID, 1)&lt;br /&gt;
 EndFunc ;==&amp;gt;SetCursor&lt;br /&gt;
 &lt;br /&gt;
 ; Check cursor type and resize/drag window as required&lt;br /&gt;
 Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     Local $iCursorType = _Check_Border()&lt;br /&gt;
     If $iCursorType &amp;gt; 0 Then ; Cursor is set to resizing style so send appropriate resize message&lt;br /&gt;
         $iResizeType = 0xF000 + $iCursorType&lt;br /&gt;
         _SendMessage($hGUI, $WM_SYSCOMMAND, $iResizeType, 0)&lt;br /&gt;
     Else&lt;br /&gt;
         Local $aCurInfo = GUIGetCursorInfo($hGUI)&lt;br /&gt;
         If $aCurInfo[4] = 0 Then ; Mouse not over a control&lt;br /&gt;
             _SendMessage($hGUI, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0)&lt;br /&gt;
         EndIf&lt;br /&gt;
     EndIf&lt;br /&gt;
 EndFunc ;==&amp;gt;WM_LBUTTONDOWN&lt;br /&gt;
 &lt;br /&gt;
 ; Determines if mouse cursor over a border&lt;br /&gt;
 Func _Check_Border()&lt;br /&gt;
     Local $aCurInfo = GUIGetCursorInfo()&lt;br /&gt;
     Local $aWinPos = WinGetPos($hGUI)&lt;br /&gt;
     Local $iSide = 0&lt;br /&gt;
     Local $iTopBot = 0&lt;br /&gt;
     If $aCurInfo[0] &amp;lt; $iMargin Then $iSide = 1&lt;br /&gt;
     If $aCurInfo[0] &amp;gt; $aWinPos[2] - $iMargin Then $iSide = 2&lt;br /&gt;
     If $aCurInfo[1] &amp;lt; $iMargin Then $iTopBot = 3&lt;br /&gt;
     If $aCurInfo[1] &amp;gt; $aWinPos[3] - $iMargin Then $iTopBot = 6&lt;br /&gt;
     Return $iSide + $iTopBot&lt;br /&gt;
 EndFunc ;==&amp;gt;_Check_Border&lt;br /&gt;
 &lt;br /&gt;
 ; Set min and max GUI sizes&lt;br /&gt;
 Func _WM_GETMINMAXINFO($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     $tMinMaxInfo = DllStructCreate(&amp;quot;int;int;int;int;int;int;int;int;int;int&amp;quot;, $lParam)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  7, $iGUIMinX)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  8, $iGUIMinY)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  9, $iGUIMaxX)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo, 10, $iGUIMaxY)&lt;br /&gt;
     Return 0&lt;br /&gt;
 EndFunc   ;==&amp;gt;_WM_GETMINMAXINFO&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
And now using the &amp;#039;&amp;#039;$WM_NCLBUTTONDOWN&amp;#039;&amp;#039; message&lt;br /&gt;
-----------------------------------&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
 #include &amp;lt;GuiConstantsEx.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;Windowsconstants.au3&amp;gt;&lt;br /&gt;
 #include &amp;lt;SendMessage.au3&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 HotKeySet(&amp;quot;{ESC}&amp;quot;, &amp;quot;On_Exit&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 ; Set distance from edge of window where resizing is possible&lt;br /&gt;
 Global Const $iMargin = 4&lt;br /&gt;
 ; Set max and min GUI sizes&lt;br /&gt;
 Global Const $iGUIMinX = 50, $iGUIMinY = 50, $iGUIMaxX = 300, $iGUIMaxY = 300&lt;br /&gt;
 &lt;br /&gt;
 ; Create GUI&lt;br /&gt;
 $hGUI = GUICreate(&amp;quot;Y&amp;quot;, 100, 100, -1, -1, $WS_POPUP)&lt;br /&gt;
 GUISetBkColor(0x00FF00)&lt;br /&gt;
 GUISetState()&lt;br /&gt;
 &lt;br /&gt;
 ; Register message handlers&lt;br /&gt;
 GUIRegisterMsg($WM_LBUTTONDOWN, &amp;quot;_WM_LBUTTONDOWN&amp;quot;)     ; For resize/drag&lt;br /&gt;
 GUIRegisterMsg($WM_MOUSEMOVE, &amp;quot;_SetCursor&amp;quot;)            ; For cursor type change&lt;br /&gt;
 GUIRegisterMsg($WM_GETMINMAXINFO, &amp;quot;_WM_GETMINMAXINFO&amp;quot;) ; For GUI size limits&lt;br /&gt;
 &lt;br /&gt;
 While 1&lt;br /&gt;
     Sleep(10)&lt;br /&gt;
 WEnd&lt;br /&gt;
 &lt;br /&gt;
 ; Check cursor type and resize/drag window as required&lt;br /&gt;
 Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     Local $iCursorType = _GetBorder()&lt;br /&gt;
     If $iCursorType &amp;gt; 0 Then ; Cursor is set to resizing style&lt;br /&gt;
         $iResizeType = 0xF000 + $iCursorType&lt;br /&gt;
         _SendMessage($hGUI, $WM_SYSCOMMAND, $iResizeType, 0)&lt;br /&gt;
     Else&lt;br /&gt;
         Local $aCurInfo = GUIGetCursorInfo($hGUI)&lt;br /&gt;
         If $aCurInfo[4] = 0 Then ; Mouse not over a control&lt;br /&gt;
             DllCall(&amp;quot;user32.dll&amp;quot;, &amp;quot;int&amp;quot;, &amp;quot;ReleaseCapture&amp;quot;)&lt;br /&gt;
             _SendMessage($hGUI, $WM_NCLBUTTONDOWN, $HTCAPTION, 0)&lt;br /&gt;
         EndIf&lt;br /&gt;
    EndIf&lt;br /&gt;
 EndFunc ;==&amp;gt;WM_LBUTTONDOWN&lt;br /&gt;
 &lt;br /&gt;
 ; Set cursor to correct resizing form if mouse is over a border&lt;br /&gt;
 Func _SetCursor()&lt;br /&gt;
     Local $iCursorID&lt;br /&gt;
     Switch _GetBorder()&lt;br /&gt;
         Case 0&lt;br /&gt;
             $iCursorID = 2&lt;br /&gt;
         Case 1, 2&lt;br /&gt;
             $iCursorID = 13&lt;br /&gt;
         Case 3, 6&lt;br /&gt;
             $iCursorID = 11&lt;br /&gt;
         Case 5, 7&lt;br /&gt;
             $iCursorID = 10&lt;br /&gt;
         Case 4, 8&lt;br /&gt;
             $iCursorID = 12&lt;br /&gt;
     EndSwitch&lt;br /&gt;
     GUISetCursor($iCursorID, 1)&lt;br /&gt;
 EndFunc ;==&amp;gt;SetCursor&lt;br /&gt;
 &lt;br /&gt;
 ; Determines if mouse cursor over a border&lt;br /&gt;
 Func _GetBorder()&lt;br /&gt;
     Local $aCurInfo = GUIGetCursorInfo()&lt;br /&gt;
     Local $aWinPos = WinGetPos($hGUI)&lt;br /&gt;
     Local $iSide = 0&lt;br /&gt;
     Local $iTopBot = 0&lt;br /&gt;
     If $aCurInfo[0] &amp;lt; $iMargin Then $iSide = 1&lt;br /&gt;
     If $aCurInfo[0] &amp;gt; $aWinPos[2] - $iMargin Then $iSide = 2&lt;br /&gt;
     If $aCurInfo[1] &amp;lt; $iMargin Then $iTopBot = 3&lt;br /&gt;
     If $aCurInfo[1] &amp;gt; $aWinPos[3] - $iMargin Then $iTopBot = 6&lt;br /&gt;
     Return $iSide + $iTopBot&lt;br /&gt;
 EndFunc ;==&amp;gt;_GetBorder&lt;br /&gt;
 &lt;br /&gt;
 ; Set min and max GUI sizes&lt;br /&gt;
 Func _WM_GETMINMAXINFO($hWnd, $iMsg, $wParam, $lParam)&lt;br /&gt;
     $tMinMaxInfo = DllStructCreate(&amp;quot;int;int;int;int;int;int;int;int;int;int&amp;quot;, $lParam)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  7, $iGUIMinX)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  8, $iGUIMinY)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo,  9, $iGUIMaxX)&lt;br /&gt;
     DllStructSetData($tMinMaxInfo, 10, $iGUIMaxY)&lt;br /&gt;
     Return 0&lt;br /&gt;
 EndFunc   ;==&amp;gt;_WM_GETMINMAXINFO&lt;br /&gt;
 &lt;br /&gt;
 Func On_Exit()&lt;br /&gt;
     Exit&lt;br /&gt;
 EndFunc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
-----------------------------------&lt;br /&gt;
[[Summary]]&lt;br /&gt;
&lt;br /&gt;
Although it seems impossible to move and resize &amp;#039;&amp;#039;$WS_POPUP&amp;#039;&amp;#039; style GUIs because they lack the usual title bar and borders, you can se that it is not that difficult to do it.  All we do is mimic what Windows does to a normal GUI!&lt;/div&gt;</summary>
		<author><name>Rt01</name></author>
	</entry>
</feed>