首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ExpressPrintingSystem 学习

Posted on 2011-03-25 15:02  colincode  阅读(673)  评论(0)    收藏  举报

1、要使打印预览有office风格 要引用上dxPSPrVwRibbon。

2、保存控件属性和还原属性(可用于保存打印设置)

procedure TfmFtpUpdater.PropertiesStore;
Var
  AStoreComponent: TcxPropertiesStoreComponent;
begin
  try
    cxPropertiesStore1.StorageName := ExtractFilePath(ParamStr(0)) + 'options.ini';
 
    cxPropertiesStore1.StorageType := stIniFile;
    AStoreComponent := TcxPropertiesStoreComponent(cxPropertiesStore1.Components.Add);
 
    AStoreComponent.Component := fmFtpUpdater;
    AStoreComponent.Properties.Add('top');
    AStoreComponent.Properties.Add('left');
    AStoreComponent.Properties.Add('height');
    AStoreComponent.Properties.Add('width');
    AStoreComponent.Properties.Add('WindowState');
 
    cxPropertiesStore1.StoreTo(false);
  finally
    FreeAndNil(AStoreComponent);
  end;
 
end;
 
procedure TfmFtpUpdater.PropertiesReStore;
Var
  AStoreComponent: TcxPropertiesStoreComponent;
begin
  try
    cxPropertiesStore1.StorageName := ExtractFilePath(ParamStr(0)) + 'options.ini';
 
    cxPropertiesStore1.StorageType := stIniFile;
    AStoreComponent := TcxPropertiesStoreComponent(cxPropertiesStore1.Components.Add);
 
    AStoreComponent.Component := fmFtpUpdater;
    AStoreComponent.Properties.Add('top');
    AStoreComponent.Properties.Add('left');
    AStoreComponent.Properties.Add('height');
    AStoreComponent.Properties.Add('width');
    AStoreComponent.Properties.Add('WindowState');
 
    cxPropertiesStore1.RestoreFrom;
  finally
    FreeAndNil(AStoreComponent);
  end;
 
end;