Examples Delphi

procedure TForm1.Button1Click(Sender:TObject);
var
h : THandle;
begin
h := LoadImage(0,
'C:\TheWall\Magic.ani',
IMAGE_CURSOR,
0,
0,
LR_DEFAULTSIZE or
LR_LOADFROMFILE);
if h = 0 then ShowMessage('Cursor not loaded') else begin
Screen.Cursors[1] := h;
Form1.Cursor := 1;
end;
end;