首先,我正在为一位严重依赖自定义风格的客户编写应用程序。这些样式由几个子控件和视觉效果组成(TBlurEffect,TShadowEffect等......)
在我的开发机器上,这些效果和样式正确呈现,没有错误(Windows Server 2012),运行Windows 7的另一台测试机也是如此。当尝试在客户端的某个服务器上运行时,我收到一个抽象错误风格是适用的。我创建了一个包含4种不同风格的测试应用程序(其中3种具有效果,1种只是TRectangle)。 3种效果样式都给出了相同的抽象错误,但是简单的矩形样式没有(让我相信这是罪魁祸首)。
我验证了客户端机器符合规格,但我仍然觉得有些东西是关闭的: http://docwiki.embarcadero.com/RADStudio/XE5/en/FireMonkey_Platform_Prerequisites
最终,我希望这些效果起作用,但如果与Firemonkey要求相比,客户系统有什么问题,我想看看是否有某种指令或全局变量我可以用来检查,并在运行时禁用效果。如果有人能提供帮助,那将不胜感激。
客户dxdiag结果: ------------------系统信息 ------------------本报告时间:2015年3月10日,10:28:20 机器名称:## REMOVED ##操作系统:Windows Server 2003,Enterprise Edition(5.2,Build 3790)Service Pack 2(3790.srv03_sp2_qfe.130703-1535) 语言:英语(区域环境:英语)系统制造商:Dell Inc. 系统模型:PowerEdge 1950 BIOS:Phoenix ROM BIOS PLUS版本1.10 2.7.0 处理器:Intel(R)Xeon(R)CPU E5310 @ 1.60GHz(8个CPU),~1.6GHz 内存:8186MB RAM 页面文件:使用3175MB,可用6861MB Windows目录:C:\ WINDOWS DirectX版本:DirectX 9.0c(4.09.0000.0904)DX设置参数:未找到 DxDiag版本:5.03.3790.3959 32位Unicode
我的测试项目:
program Project1;
uses
System.StartUpCopy,
FMX.Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
我的测试单位:
unit Unit1;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
FMX.ListBox,FMX.NumberBox,FMX.TabControl;
type
TForm1 = class(TForm)
StyleBook1: TStyleBook;
Button1: TButton;
Button2: TButton;
Button3: TButton;
Panel1: TPanel;
ComboBox1: TComboBox;
Label1: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.fmx}
procedure TForm1.Button1Click(Sender: TObject);
var
I: Integer;
begin
Self.StyleBook:=StyleBook1;
ComboBox1.Items.Clear;
for I := 0 to StyleBook1.Style.ChildrenCount-1 do
Begin
ComboBox1.Items.Add(StyleBook1.Style.Children[i].StyleName);
End;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
if ComboBox1.ItemIndex>-1 then
Panel1.StyleLookup:=ComboBox1.Selected.Text;
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Self.StyleBook:=Nil;
Panel1.StyleLookup:='';
ComboBox1.Items.Clear;
end;
end.
我的表格:
object Form1: TForm1
Left = 0
Top = 0
Caption = 'Form1'
ClientHeight = 480
ClientWidth = 640
FormFactor.Width = 320
FormFactor.Height = 480
FormFactor.Devices = [Desktop]
DesignerMasterStyle = 0
object StyleBook1: TStyleBook
Left = 256
Top = 192
ResourcesBin = {
464D585F5354594C4520322E3501060D74657374626C75727374796C65034401
060F74657374736861646F777374796C65039301060D74657374676C6F777374
796C65036A010611746573746E6F6566666563747374796C65030A0100545046
3007544C61796F757400095374796C654E616D65060D74657374626C75727374
796C6505416C69676E0706436C69656E740A53697A652E576964746805000000
00000040F108400B53697A652E48656967687405000000000000008A08401453
697A652E506C6174666F726D44656661756C74080756697369626C6508085461
624F726465720200000A5452656374616E676C6500095374796C654E616D6506
0E72656374616E676C657374796C6505416C69676E0706436C69656E740A5369
7A652E57696474680500000000000040F108400B53697A652E48656967687405
000000000000008A08401453697A652E506C6174666F726D44656661756C7408
00000B54426C757245666665637400095374796C654E616D65060F626C757265
66666563747374796C6508536F66746E6573730500000000009A9999FD3F0000
005450463007544C61796F757400095374796C654E616D65060F746573747368
61646F777374796C6505416C69676E0706436C69656E740A53697A652E576964
74680500000000000000C804400B53697A652E48656967687405000000000000
00C804401453697A652E506C6174666F726D44656661756C7408085461624F72
6465720201000A5452656374616E676C6500095374796C654E616D65060E7265
6374616E676C657374796C6505416C69676E0706436C69656E740A53697A652E
57696474680500000000000000C804400B53697A652E48656967687405000000
00000000C804401453697A652E506C6174666F726D44656661756C740800000D
54536861646F7745666665637400095374796C654E616D650611736861646F77
6566666563747374796C650844697374616E63650500000000000000C0004009
446972656374696F6E0500000000000000B4044008536F66746E657373050000
0000009A9999FD3F074F7061636974790500000000009A9999FE3F0B53686164
6F77436F6C6F720708636C61426C61636B0000005450463007544C61796F7574
00095374796C654E616D65060D74657374676C6F777374796C6505416C69676E
0706436C69656E740A53697A652E57696474680500000000000040F108400B53
697A652E48656967687405000000000000008A08401453697A652E506C617466
6F726D44656661756C74080756697369626C6508085461624F72646572020200
0A5452656374616E676C6500095374796C654E616D65060E72656374616E676C
657374796C6505416C69676E0706436C69656E740A53697A652E576964746805
00000000000040F108400B53697A652E48656967687405000000000000008A08
401453697A652E506C6174666F726D44656661756C740800000B54476C6F7745
666665637400095374796C654E616D65060F676C6F776566666563747374796C
6508536F66746E657373050000000000CDCCCCFD3F09476C6F77436F6C6F7207
07636C61476F6C64074F7061636974790500000000006666E6FE3F0000005450
463007544C61796F757400095374796C654E616D650611746573746E6F656666
6563747374796C6505416C69676E0706436C69656E740A53697A652E57696474
680500000000000040F108400B53697A652E4865696768740500000000000000
8A08401453697A652E506C6174666F726D44656661756C74080756697369626C
6508085461624F726465720203000A5452656374616E676C6500095374796C65
4E616D65060E72656374616E676C657374796C6505416C69676E0706436C6965
6E740A53697A652E57696474680500000000000040F108400B53697A652E4865
6967687405000000000000008A08401453697A652E506C6174666F726D446566
61756C7408000000}
end
object Button1: TButton
Position.X = 32.000000000000000000
Position.Y = 136.000000000000000000
Size.Width = 161.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 5
Text = 'Assign StyleBook to Form'
OnClick = Button1Click
end
object Button2: TButton
Position.X = 32.000000000000000000
Position.Y = 192.000000000000000000
Size.Width = 161.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 3
Text = 'Assign Style to Panel'
OnClick = Button2Click
end
object Button3: TButton
Position.X = 32.000000000000000000
Position.Y = 248.000000000000000000
Size.Width = 161.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 1
Text = 'Clear Style Book and Style'
OnClick = Button3Click
end
object Panel1: TPanel
Align = Right
Position.X = 248.000000000000000000
Size.Width = 392.000000000000000000
Size.Height = 480.000000000000000000
Size.PlatformDefault = False
TabOrder = 4
end
object ComboBox1: TComboBox
Position.X = 32.000000000000000000
Position.Y = 56.000000000000000000
Size.Width = 161.000000000000000000
Size.Height = 22.000000000000000000
Size.PlatformDefault = False
TabOrder = 6
end
object Label1: TLabel
Position.X = 32.000000000000000000
Position.Y = 40.000000000000000000
Text = 'Style'
end
object BlurEffect1: TBlurEffect
Softness = 0.300000011920929000
end
end