title: Alternative to TControl.Perform
body: <p>the <code>TControl.Perform</code> code is:</p>
  
  <pre><code>var
    Message: TMessage;
  begin
    Message.Msg := Msg;
    Message.WParam := WParam;
    Message.LParam := LParam;
    Message.Result := 0;
    if Self &lt;&gt; nil then WindowProc(Message);
    Result := Message.Result;
  </code></pre>
  
  <p>The program execution awaits return, am i right?</p>
  
  <p>There is an alternative, for posting a message in a TFORM queue, inside another thread, in the same Application, without waiting return? </p>
  
  <h2>EDIT</h2>
  
  <p>This approach could mitigate the problem?</p>
  
  <pre><code>interface
  
  const  
    WM_DOSTUFF = WM_APP + $001;
  
  TMyForm = class(TForm)
  {stuff}
  public
  {Other stuff}
    procedure DoMyStuff(var Msg: TMessage); message WM_DOSTUFF;   
  {More stuff}
  end;  
  
  var
    MyHandle: HWND;
  
  implementation
  
  constructor TMyForm.Create(AOwner: TComponent);
  begin
    inherited;
    MyHandle := AllocateHWnd(DoMyStuff);
  end; 
  
  destructor TMyForm.Destroy;
  begin
    DeallocateHWnd(MyHandle);
    inherited;
  end;
  </code></pre>
  
  <p>And use normally inside a thread: </p>
  
  <pre><code>  PostMessage(MyHandle, WM_DOSTUFF, 0, 0);   
  </code></pre>