title: How to call a procedure from inside another procedure
body: <p>There is this link <a href="https://stackoverflow.com/questions/5363287/how-do-i-invoke-a-procedure-when-inside-another-procedure-in-pascal">How do I Invoke a procedure when inside another procedure in Pascal</a> But its not exactly my case.</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
     [...]
  begin
    // click on button
    [...]
  end; 
  </code></pre>
  
  <p>and I have this procedure </p>
  
  <pre><code>procedure TForm1.CheckListBox2DblClick(Sender: TObject);
  begin
    // on double click in flags
    [the same code like above]
  end; 
  </code></pre>
  
  <p>i tryed this but it does not work</p>
  
  <pre><code>procedure TForm1.CheckListBox2DblClick(Sender: TObject);
  begin
    TForm1.Button1Click;
  end;    
  </code></pre>
  
  <p>then I tryed this</p>
  
  <pre><code>procedure TForm1.CheckListBox2DblClick(Sender: TObject);
  begin
    TForm1.Button1Click(Sender: TObject);
  end; 
  </code></pre>
  
  <p>it also does not work<br>
  Can somebody please help me ?</p>