Question
I want to make my programs original. I made myself a custom cursor in the format ".cur". I want to know if i can somehow add this to Delphi.
Answer
Delphi has no direct routine for loading a custom cursor from a cursor-file, but it is possible with the Win API function LoadCursorFromFile. Source code example, with cursor file 'NewCursor.cur' in the directory of your application:
const crNewCursor = 1; CurFile = 'NewCursor.cur'; var CurFilePath: string; ... begin CurFilePath := ExtractFileDir(Application.ExeName) + '\' + CurFile; Screen.Cursors[crNewCursor2] := LoadCursorFromFile(PChar(CurFilePath)); Screen.Cursor := crNewCursor2; end;