Cursor Image lazarus / 39-Graphics ---------------------------------------------------------------------- march · 2011-02-08 08:42 How do I get the image of a current standard cursor, like crArrow? The icon must be stored somewhere. I would like to be able to draw it on a canvas or add it to a bitmap, etc. ---------------------------------------------------------------------- ringo · 2011-02-08 08:51 I'll make the assumption that you are running Windows. Take a look in C:\WINDOWS\Cursors (or your install equivalent) to find the graphics of all the normal cursors.  They are files called xxx.CUR.  A CUR file is a 2-color transparent icon, and can be opened by most Windows-base graphics editor. Ringo ---------------------------------------------------------------------- march · 2011-02-08 19:26 I do happen to be using Lazarus under Win XP, but my application needs access to the current cursor image, in real time, in a way that is independent of the operating system. An instant cursor change can be coded by simply invoking a new constant. I expect there must be a connection to the image available through a Lazarus or FPC library. ---------------------------------------------------------------------- Leledumbo · 2011-02-09 04:57 Quotebut my application needs access to the current cursor image, in real time, in a way that is independent of the operating systemHmm... Screen.Cursors ? ---------------------------------------------------------------------- march · 2011-02-10 06:02 Screen.Cursors are type hCursor. I do not really know how to derive an image from that, but after much deliberation, gave it a try anyhow. This compiled and ran but produced no result on a blank area of the form. Something is missing or it may be completely wrong. Lazarus 0.9.28.2, FPC 2.2.4, WinXP Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure tFormMain.DrawMainCanvas(Sender: tObject);var TheCursorImage  : tCursorImage; begin ... TheCursorImage := tCursorImage.Create;       TheCursorImage.Handle := screen.cursors[screen.cursor]; Canvas.Draw( 700,200,TheCursorImage); TheCursorImage.Free; ...