The Delphi Bug List

Entry No.
11
VCL - MDI
When an MDI Child Form is minimized at design time, upon running weird effects occur
1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 4.03 5.0 5.01 6.0 6.01 6.02 Kylix 1.0
AbsentExistsExistsExistsExistsExistsExistsExistsExistsExistsExistsExistsExistsExistsN/A
Description
Reported by Ricky Jung; checked by Neil Booth; Torbjørn Pedersen
Example that shows the weird effects:
  • Create an empty form. (This is the Parent Form)

  • In the Object Inspector, set FormStyle to fsMDIForm.
  • Create another empty form (This is the child form)

  • In the Object Inspector, set FormStyle to fsMDIChild and WindowState is wsMinimized
  • Run
  • Upon running, the child window is not minimized (though upon clicking it becomes minimized)
    The real weird things happen when you have controls (like Edits or Labels) on the Parent Form: they disappear (Label) or 'peep through' the child window (Edit)

    Comment from checker: This is certainly not the behaviour a reasonable person would expect. As it does not happen in Delphi 1.0, I would expect this to be a VCL bug rather than the notoriously bug-ridden Windows MDI implementation

    Comment from other checker:
    When clicking the form I get the forms system menu!

    Solution / workaround
    Make the WindowState of the child form wsNormal at design time, and in the OnCreate handler of the child form, set its WindowsState to wsMinimized.
    This does not change the wrong display of the controls on the Parent form, however!
    Latest update of this entry: 2002-04-03

    Post a comment on this bug


    Index page
    Delphi Bug List home page
    The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
    All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.