Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think I have the solution: </p> <p>Here is how to change the cursor for 'the whole desktop' - not just for your application:</p> <pre><code>SetSystemCursor(Screen.Cursors[crDefault], OCR_NORMAL); </code></pre> <p>But be warned: any other applications/windows that want to change cursors will do so - so this is only effective if your user doesn't mess around with other applications while YOUR application is busy. As an over-ride, you could temporarily change all your systems default cursors to the cursor you want - and change them all back after the process.</p> <p>I am still disappointed at the MSDN for not providing its cursor types for SetCursor - but fortunately I didn't end up having to use it.</p> <p><strong>Update:</strong> This seems to be the right track, but I can't seem to change the cursor back after SetSystemCursor(Screen.Cursors[crHourGlass], OCR_NORMAL); If anybody's reading this, I would appreciate if you take a moment to provide me with some working code - that 1. Sets the System Cursor to an hourglass, and then back to an arrow.</p> <p><strong>edit:</strong> Sample code for reverting back to default cursor:</p> <pre><code>procedure TForm1.Button1Click(Sender: TObject); var cArrow, cHour: HCURSOR; begin cArrow := CopyImage(Screen.Cursors[crArrow], IMAGE_CURSOR, 0, 0, LR_COPYFROMRESOURCE); cHour := CopyImage(Screen.Cursors[crHourGlass], IMAGE_CURSOR, 0, 0, LR_COPYFROMRESOURCE); if (cArrow &lt;&gt; 0) and (cHour &lt;&gt; 0) and SetSystemCursor(cHour, OCR_NORMAL) then try // do processing finally SetSystemCursor(cArrow, OCR_NORMAL); end; end; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload