我正在尝试将一些在 Delphi XE8 中工作的代码移植到 Delphi 10 Seattle。
这段代码设置了我程序的默认系统样式,但是在 Delphi 10 Seattle 中不存在 SetSystemStyle 方法。
TStyleManager.SetSystemStyle(Self);
我正在尝试将一些在 Delphi XE8 中工作的代码移植到 Delphi 10 Seattle。
这段代码设置了我程序的默认系统样式,但是在 Delphi 10 Seattle 中不存在 SetSystemStyle 方法。
TStyleManager.SetSystemStyle(Self);
我添加了 Default_Style_Block_Pointer: TMemoryStream; 到 MainForm Var: 块
我将此代码放在 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));