Change SkinName while Application is running.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #39650
    chubbson
    Participant

      I've done it…
      had read the skinandstream demo

      sorry for posting extra topic

      heres tha solution

      CODE
      procedure TForm1.sComboBox1Change(Sender: TObject);
      var
      fullFileName: String;
      const
      SkinName = 'Skin loaded from stream';
      begin
      fullFileName := sSkinManager1.SkinDirectory + '' + sComboBox1.Text;

      sSkinManager1.Active := false;

      ms := TMemoryStream.Create;
      ms.LoadFromFile(sSkinManager1.SkinDirectory + '' + sComboBox1.Text);

      sSkinManager1.IsDefault := True;
      sSkinManager1.InternalSkins.Add;
      sSkinManager1.InternalSkins[sSkinManager1.InternalSkins.Count – 1].Name := sComboBox1.Text;
      sSkinManager1.InternalSkins[sSkinManager1.InternalSkins.Count – 1].PackedData.LoadFromStream(ms);
      if FileExists(fullFileName) then begin
      sSkinManager1.SkinName := sComboBox1.Text;
      end;
      sSkinManager1.Active := True;
      FreeAndNil(ms);

      end;

      thx bye

    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.