Change SkinName while Application is running.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33053
    chubbson
    Participant

    Hi.. I havnt found any Demos about thit.. Perhap its not posible.

    Is it able to change a skin while Application is Running?

    Like this

    CODE
    sSkinManager1.Active := false;
    if FileExists(fullFileName) then begin
    sSkinManager1.SkinName := sComboBox1.Text;
    end;
    sSkinManager1.Active := true;

    sSkinManager1.Active := true;

    If I try this. SkinManager will deactivate.. but never activate.. and I have a standart Form.. Default grey

    Ehhrm im using D7

    Thx for Answer and Informations..

    #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 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.