FormStyle (C++)

From RAD Studio Code Examples
Jump to: navigation, search

Description

This example ensures that the main form of the application is an MDI parent.

Code

__fastcall TForm1::TForm1(TComponent* Owner)
  : TForm(Owner)
{
  if(FormStyle != fsMDIForm)
    	  FormStyle = fsMDIForm;
  if(FormStyle == fsMDIForm)
    	  Edit1->Text = "MDI form";
  else
    //This line never executes
    Edit1->Text = "Not an MDI form";
}

Uses