Reputation: 184
I am trying to port some code that works in Delphi XE8 to Delphi 10 Seattle.
This code sets the default system style of my program, but the SetSystemStyle method does not exist in the Delphi 10 Seattle.
TStyleManager.SetSystemStyle(Self);
Upvotes: 1
Views: 997
Reputation: 184
I added the Default_Style_Block_Pointer: TMemoryStream; to the MainForm Var: block
I placed this code in the MainForm.OnCreate event:
Default_Style_Block_Pointer:=TMemoryStream.Create;
TStyleStreaming.SaveToStream(TStyleManager.ActiveStyle(Self),Default_Style_Block_Pointer,TStyleFormat.Binary);
I am using this code to restore the default style:
Default_Style_Block_Pointer.Position:=0;
TStyleManager.SetStyle(TStyleStreaming.LoadFromStream(Default_Style_Block_Pointer));
Upvotes: 3