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;
浙公网安备 33010602011771号