How to change the cursor at a certain point in Inno Setup?

1

I need to make the cursor change while it is executing a specific task, return it to its normality when it finishes.

    
asked by Joesatriani10 31.07.2017 в 23:55
source

1 answer

1

There is a function in this page. Here's the function:

procedure SetControlCursor(control: TWinControl; cursor: TCursor);
var i:Integer;
    wc: TWinControl;
begin
  if (not (control = nil)) then begin
    control.Cursor := cursor;
    try
      for i:=0 to control.ControlCount-1 do begin
        wc := TWinControl(control.Controls[i]);
        if (NOT(wc = nil)) then
          SetControlCursor(wc, cursor)
        else
          control.Controls[i].Cursor := cursor;
      end; {for}
    finally

    end;{try}
  end;{if}
end;{procedure SetControlCursor}

You call like this:

  SetControlCursor(WizardForm, crHourGlass);

To return to normal:

  SetControlCursor(WizardForm, crDefault);
    
answered by 01.08.2017 / 00:02
source