title: Error Creating TActivityIndicator at Runtime
body: <p>I saw the introduction of the TActivityIndicator in Delphi 10 Seattle and thought cool I could make use of this somewhere. I wanted to use this to show that some dynamically created sections of my form were still loading the data before populating the form. So I thought I'd do this before I start loading my data in <code>FormShow</code>, where self is the form.</p>
  
  <pre><code>indicator := TActivityIndicator.Create(self);
  indicator.IndicatorSize := TActivityIndicatorSize.aisLarge;
  </code></pre>
  
  <p>Sadly when I try to create them dynamically and set then <code>TActivityIndicator.IndicatorSize</code> I get an exception <code>... EInvalidOperation with message 'Control '&lt;name&gt;' has no parent window'</code> Which stepping through the VCL takes me to <code>Vcl.Controls TWinControl.CreateWnd</code> specifically</p>
  
  <pre><code>if (WndParent = 0) and (Style and WS_CHILD &lt;&gt; 0) then
    if (Owner &lt;&gt; nil) and (csReading in Owner.ComponentState) and
      (Owner is TWinControl) then
      WndParent := TWinControl(Owner).Handle
    else
      raise EInvalidOperation.CreateFmt(SParentRequired, [Name]);
  </code></pre>
  
  <p>I've checked <code>Owner</code> is the form which is of course a TWinControl but <code>(csReading in Owner.ComponentState)</code> returns false. Stepping through Owner.ComponentState = [] on FormCreate and [csFreeNotification] on FormShow.</p>
  
  <p>I've found that if you try to change the <code>IndicatorSize</code> of a TActivityIndicator that was created at design time then it works perfectly. So what am I missing here or is it not possible to create <code>TActivityIndicators</code> at runtime? </p>