</head> <body> <h1>WinMaximize</h1> <p>Enlarges the specified window to its maximum size.</p> <pre class="Syntax"><span class="func">WinMaximize</span> <span class="optional">, WinTitle, WinText, ExcludeTitle, ExcludeText</span></pre> <h2 id="Parameters">Parameters</h2> <dl> <dt>WinTitle</dt> <dd><p>A window title or other criteria identifying the target window. See <a href="../misc/WinTitle.htm">WinTitle</a>.</p></dd> <dt>WinText</dt> <dd><p>If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if <a href="DetectHiddenText.htm">DetectHiddenText</a> is ON.</p></dd> <dt>ExcludeTitle</dt> <dd><p>Windows whose titles include this value will not be considered.</p></dd> <dt>ExcludeText</dt> <dd><p>Windows whose text include this value will not be considered.</p></dd> </dl> <h2 id="Remarks">Remarks</h2> <p>Use <a href="WinRestore.htm">WinRestore</a> to unmaximize a window and <a href="WinMinimize.htm">WinMinimize</a> to minimize it.</p> <p>If a particular type of window does not respond correctly to WinMaximize, try using the following instead:</p> <pre><a href="PostMessage.htm">PostMessage</a>, 0x0112, 0xF030,,, WinTitle, WinText <em>; 0x0112 = WM_SYSCOMMAND, 0xF030 = SC_MAXIMIZE</em></pre> <p>This command operates only upon the topmost matching window except when <em>WinTitle</em> is <a href="GroupAdd.htm">ahk_group GroupName</a>, in which case all windows in the group are affected.</p> <p>Window titles and text are case sensitive. Hidden windows are not detected unless <a href="DetectHiddenWindows.htm">DetectHiddenWindows</a> has been turned on.</p> <h2 id="Related">Related</h2> <p><a href="WinRestore.htm">WinRestore</a>, <a href="WinMinimize.htm">WinMinimize</a></p> <h2 id="Examples">Examples</h2> <div class="ex" id="ExBasic"> <p><a class="ex_number" href="#ExBasic"></a> Opens Notepad, waits until it exists and maximizes it.</p> <pre>Run, notepad.exe WinWait, Untitled - Notepad WinMaximize <em>; Use the window found by WinWait.</em></pre> </div> <div class="ex" id="ExHotkey"> <p><a class="ex_number" href="#ExHotkey"></a> Press a hotkey to maximize the active window.</p> <pre>^Up::WinMaximize, A <em>; Ctrl+Up</em></pre> </div> </body> </html>