tips
[Top] [All Lists]

Maximizing the MDI frame window on Win32

To: "REALbasic Tips" <realbasic-tips at lists dot realsoftware dot com>
Subject: Maximizing the MDI frame window on Win32
From: Geoff Perlman <geoff at realsoftware dot com>
Date: Fri, 15 Sep 2000 17:27:34 -0500
Many MDI (multiple document interface) applications on Windows maximize the MDI frame window when launched. The MDI frame window is the parent window in
which the applications windows open.

If you are compiling a Win32 version of your REALbasic project and would
like to maximize the MDI frame window when your application launches, put
the following code in the Open event of your application class:

  dim result as integer

  CONST SW_MAXIMIZE = 3

Declare Function ShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As
Integer, ByVal nCmdShow As Integer) As Integer
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" As
Integer

  result = ShowWindow(GetActiveWindow(), SW_MAXIMIZE)

Note: If you don't have an application class in your project, choose New
Class from the File menu, select Application as the Super property for the
New class and name it "app".
--

Geoff Perlman
President & CEO
REAL Software, Inc.
http://www.realsoftware.com
mailto:geoff at realsoftware dot com
Phone: 512-263-1233 x711
Fax:   512-263-1441



 - - - - - - - - - -
Got a useful tip to share? Send it to us at:
REALbasic-tips at lists dot realsoftware dot com dot
For list commands, send "Help" in the body of a message to
<requests at lists dot realsoftware dot com>



<Prev in Thread] Current Thread [Next in Thread>
  • Maximizing the MDI frame window on Win32, Geoff Perlman <=