LoadCursorFromFile('tmp.ani');
如果是从资源文件中读出的话
可以
来自:柳五公子
资源文件中定义:
AAA RCDATA "AAA.ANI"
procedure TForm1.Button2Click(Sender: TObject);
var
resstrm :TResourceStream;
fname :string;
begin
fname := ExtractFilePath(paramstr(0))+'tmp.ani';
resstrm := TResourceStream.Create(Hinstance,'AAA',RT_RCDATA);
//!!!
resstrm.SaveToFile(fname);
Screen.Cursors[crMyAni] :=LoadCursorFromFile('tmp.ani');
panel3.Cursor := crMyAni;
DeleteFile(fname);
resstrm.Free;
end;