How to use RTLEventWaitFor? lazarus / 13-General ---------------------------------------------------------------------- Elphi · 2010-04-17 10:59 How can I use RTLEventWaitFor (instead of WaitForSingleObject)? To create a fade-in effect for an image I made something like this: Code: [Select]procedure TYPPaintFadeAlphaThread.Execute; var   Step: Integer;   Interval: PRTLEvent begin   Interval := RTLEventCreate;   for Step := 0  to Steps - 1 do   begin     Picture.Canvas.FillChannel(ChannelAlpha, FAlphas[Step]);     DoPaint;     if Terminated then       Break     else if Step < (Steps - 1) then       RTLEventWaitFor(Nil, Intervals[Step]);   end;   RTLEventDestroy(Interval); end;