title: Can Delphi Firemonkey TControl.MakeScreenshot work in a thread?
body: <p>I've created a simple FireMonkey screenshot capture that works fine on Android and Windows..:</p>
  
  <pre><code>procedure Capture;
  var
    B : TBitmap;
  begin
    try
      B := Layout1.MakeScreenshot;
      try
        B.SaveToFile( ..somefilepath.png );
      finally
        B.Free;
      end;
    except
      on E:Exception do
        ShowMessage( E.Message );
    end;
  end;
  </code></pre>
  
  <p>end;</p>
  
  <p>when I moved it to a thread as below, it works fine in Windows but in Android I get the exception 'bitmap too big' from the call to MakeScreenshot. Are there additional steps needed to employ MakeScreenshot in a thread? </p>
  
  <pre><code>procedure ScreenCaptureUsingThread;
  begin
     TThread.CreateAnonymousThread(
     procedure ()
     var
       B : TBitmap;
     begin
       try
         B := Layout1.MakeScreenshot;
         try
           B.SaveToFile( '...somefilepath.png' );
         finally
           B.Free;
         end;
       except
         on E:Exception do
           TThread.Synchronize( nil,
             procedure ()
             begin
               ShowMessage( E.Message );
             end );
          end).Start;
      end;
  </code></pre>
  
  <p>Later addition. Based on suggestions by Sir Rufo and Sebastian Z, this solved the problem and allowed use of a thread:</p>
  
  <pre><code>procedure Capture;
  begin
    TThread.CreateAnonymousThread(
      procedure ()
      var
        S : string;
        B : TBitmap;
      begin
        try
          // Make a file name and path for the screen shot
          S := '...SomePathAndFilename.png';     
          try
            // Take the screenshot
            TThread.Synchronize( nil,
              procedure ()
              begin
                B := Layout1.MakeScreenshot;
                // Show an animation to indicate success
                SomeAnimation.Start;
              end );
  
            B.SaveToFile( S );
          finally
            B.Free;
          end;
        except
          on E:Exception do
            begin
            TThread.Synchronize( nil,
              procedure ()
              begin
                ShowMessage( E.Message );
              end );
            end;
        end;
      end).Start;
  end;
  </code></pre>