I'm writing a component that needs some custom mouse cursors. I read some old posts on the subject and also studied the example present in the Lazarus installation folders, but something is not clear to me.
Assuming that the custom cursor file is called
pencil.cur, using the
lazres utility, I construct the resource file as follows
C:\Users\216068\Desktop\res>lazres cursors.res pencil.cur
pencil.cur ResourceName='pencil' Type=RT_GROUP_CURSORAt this point in the unit relating to the main form of my application I add the following initialization section (see attachment for the complete project):
implementation
{$R *.lfm}
//{$R *cursors.res}
{ TForm1 }
initialization
Screen.Cursors[1]:=LoadCursorFromLazarusResource('pencil');
Screen.Cursor:=1;
end.
Unfortunately the program it does not work, failing to find the cursor resource.
What did I do wrong? Thanks in advance.