由于程序控制的需要,我要实现窗体FormStyle属性可以动态改变,我写了如下代码,提示出错。
wpxxfrm.borderlcons.bimaximize:=false;//提示出错的代码
请教高手:FormStyle属性可以动态改变吗?如果能,怎样实现啊?

解决方案 »

  1.   

    BorderIcons := BorderIcons - [biMaximize];
      

  2.   

    BorderStyle property (TCustomForm)Specifies the appearance and behavior of the form border.Delphi syntax:property BorderStyle: TFormBorderStyle;C++ syntax:__property TFormBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, stored
    =IsForm, default=2};DescriptionUse BorderStyle to get or set the appearance and behavior of the form border. BorderStyle can be any of the following TFormBorderStyle values:Value MeaningbsDialog Not resizable; standard dialog box border
    bsSingle Not resizable; single-line border
    bsNone Not resizable; no visible border line
    bsSizeable Standard resizable border
    bsToolWindow like bsSingle but with a smaller caption
    bsSizeToolWin like bsSizeable with a smaller captionNote: Changing the border style of an MDI child form to bsDialog or bsNone has no effect.example:procedure TForm1.Button1Click(Sender: TObject);
    begin
    form1.borderStyle:= bsnone;
    end;