How to Maximize Setup Toolkit Window

Last reviewed: July 23, 1997
Article ID: Q88414
3.10 WINDOWS kbtool

The information in this article applies to:

  • Microsoft Windows Software Development Kit (SDK) for Windows version 3.1

The Microsoft Setup Toolkit for Windows does not provide any options or functions for maximizing the frame window. The frame window will always be initially displayed as an unmaximized window with a caption.

However, you can call the Windows ShowWindow and SetWindowLong application programming interface (API) functions from a script to maximize the frame and remove the caption. If the calls are made at the beginning of the script, there will be only a quick flicker as the window size and border are changed. The following code can be used to do this:

''following were taken from windows.h. &H means they're hex
CONST WS_VISIBLE=&H10000000 CONST WS_BORDER =&H00800000 CONST WS_CLIPCHILDREN =&H02000000 CONST GWL_STYLE =-16 CONST SW_SHOWMAXIMIZED=3

DECLARE FUNCTION ShowWindow LIB "user.exe" (hWnd%,iShow%) AS INTEGER DECLARE FUNCTION SetWindowLong LIB "user.exe" (hWnd%, offset%, style&)

                AS LONG     ''this declaration must all be on one line

.
.
.
hWnd%=HwndFrame() i1&=SetWindowLong(hWnd%,GWL_STYLE,WS_VISIBLE+WS_BORDER+WS_CLIPCHILDREN) j1%=ShowWindow(hWnd%,SW_SHOWMAXIMIZED) . . .


Additional reference words: 3.10 MSSetup tool kit
KBCategory: kbtool
KBSubcategory: TlsMss
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 23, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.