1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Rep Power

    maximized window

    can u hlp me with this prob?

    i'd like to have main application window maximized and not resizable (can be only minimized) and the other application windows (forms,...) i want to open always in front of the main app window + when i minimize main app i want to get minimizet all other app windows.

    thank u for advice.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Woodland Hills, Los Angeles County, California, USA
    Rep Power
    Set the form's WindowState property to wsMaximized and it will start up maximized. To prevent the form from being resized, you can set the style as bsDialog. Unfortunately, you can't set the form's BorderStyle to bsDialog at design time, because then the form is then created as the designed size instead of being maximized. However, you can set the borderstyle property at runtime and therefore make it maximized as well as non-sizeable. To do this:
    1. Set the WindowState property to wsMaximized at design time.
    2. Add the following code in the form's OnCreate event:
    procedure TForm1.FormCreate(Sender: TObject);
    	BorderStyle := bsDialog;
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo

IMN logo majestic logo threadwatch logo seochat tools logo