Loading a skin from memory stream

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35007
    Romans11
    Participant

    Hello!

    I am looking for a way to load Alpha skin directly from memory stream instead of *.asz file.

    I had an idea like this:

    MStream:=TResourceStream.Create(HInstance,'Office2007Blue',RT_RCDATA);

    AlphaSkin.LoadFromStream(MStream);

    but I didn't find any alternative to load it.

    Is it possible, and if yes, how can I do that?

    #47620
    Witcher
    Participant

    Hello!

    I found similar question in Russian part of forum. There is is solution:

    Code:
    const
    SkinName = 'Skin loaded from stream';
    begin
    sSkinManager1.IsDefault := True;
    sSkinManager1.InternalSkins.Add;
    sSkinManager1.InternalSkins[sSkinManager1.InternalSkins.Count – 1].Name := SkinName;
    sSkinManager1.InternalSkins[sSkinManager1.InternalSkins.Count – 1].PackedData.LoadFromfile('c:SkinsAir.asz');
    sSkinManager1.SkinName := SkinName;
    sSkinManager1.Active := True;

    You can try to use LoadFromStream instead LoadFromfile. I hope, it will be useful for you.

    #47626
    Support
    Keymaster

    Hello! Also, maybe this demo can help you.

    #47633
    Romans11
    Participant

    Big thanks! This really helped me.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.