In my Delphi 6 Pro program I'm able to change the cursor on a TWebBrowser component successfully using the code below, but only when it does not contain a valid web document:
const
theCursorID: integer = 1;
Screen.Cursors[theCursorID] := LoadCursorFromFile(PChar(theAniCursorFilename));
theWebBrowser.Cursor := theCursorID;
As soon as a web document loads, the cursor reverts to the standard mouse pointer. I'm guessing it's because the underlying window (handle/canvas/etc.) changes when a web document is loaded. How can I successfully change the mouse cursor when a web document is loaded?