窗口还原

it2022-05-06  1

procedure TFrmStyleProp.btnNewClick(Sender: TObject); var iniFile : TIniFile; idx : integer; ctrl : TControl;begin //格局还原 iniFile := TIniFile.Create(ChangeFileExt(Application.ExeName,'-posi.ini')) ; try for idx := 0 to -1 + Self.ComponentCount do begin if Components[idx] is TRzSizePanel then begin ctrl := TControl(Components[idx]) ; iniFile.EraseSection(ClassName + '.' + ctrl.Name); end; end; B_Retrun_posi := True; finally FreeAndNil(iniFile) ; end; ShowMessage('格局还原完成,重进窗口即生效!');end;

转载于:https://www.cnblogs.com/guangzhou11/p/8821694.html


最新回复(0)