如何在Delphi 10中设置默认系统样式?

如何在Delphi 10中设置默认系统样式?,delphi,delphi-10-seattle,Delphi,Delphi 10 Seattle,我正在尝试将一些在DelphiXe8中工作的代码移植到Delphi10 TStyleManager.SetSystemStyle(Self); 这段代码设置了我的程序的默认系统样式,但是SetSystemStyle方法在Delphi10中不存在 TStyleManager.SetSystemStyle(Self); 我添加了默认的\u样式\u块\u指针:TMemoryStream;到mainformvar:block 我将此代码放在MainForm.OnCreate事件中: Default_

我正在尝试将一些在DelphiXe8中工作的代码移植到Delphi10

TStyleManager.SetSystemStyle(Self);
这段代码设置了我的程序的默认系统样式,但是SetSystemStyle方法在Delphi10中不存在

TStyleManager.SetSystemStyle(Self);

我添加了默认的\u样式\u块\u指针:TMemoryStream;到mainformvar:block

我将此代码放在MainForm.OnCreate事件中:

Default_Style_Block_Pointer:=TMemoryStream.Create;
  TStyleStreaming.SaveToStream(TStyleManager.ActiveStyle(Self),Default_Style_Block_Pointer,TStyleFormat.Binary);
我正在使用此代码恢复默认样式:

     Default_Style_Block_Pointer.Position:=0; 
        TStyleManager.SetStyle(TStyleStreaming.LoadFromStream(Default_Style_Block_Pointer));

对不起,我找错地方了。该方法已被删除。我不知道如何修改你的代码。它将类似于
TStyleManager.SetStyle(xxx.GetSystemStyle(yyy))
,但我不知道从哪里获取
xxx
yyy
。在源代码中查找
IStyleBehavior
的用法。像往常一样,没有任何文件。Embarcadero将在几年内完成这项工作。From—“选中项目选项清单文件面板中标题为“启用运行时主题”的复选框。”@Alexander No,这是针对Windows VCL应用程序的