老弟,说话注意些!别人没有义务回答你的问题!
//skin.rc
s1 skin itunes.skn
//skin.dpr
library skin;
{$R skin.res}
begin
end.
//ui.dpr
program ui;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
//Unit.pas
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, WinSkinData;
type
TForm1 = class(TForm)
SkinData1: TSkinData;
procedure FormCreate(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
h: THandle;
rs: TResourceStream;
begin
h := LoadLibrary('skin.dll');
rs := TResourceStream.Create(h, 's1', 'skin');
SkinData1.LoadFromStream(rs);
rs.Free;
FreeLibrary(h);
SkinData1.Active := True;
end;
end.