title: Is it safe to change TCreateParams.WinClassName or how to find a form handle of another own application?
body: <p>I have two applications, where the first one needs to find a handle of the form from the second (also my own) but different application (not instance, but different application). I've seen some techniques, but I would like to know if it's safe what I would like to do or what is efficient way to do this.</p>
  
  <p>I was thinking about to use the <code>FindWindow</code> function where you can pass the class name, so if I would change the <code>WinClassName</code> member in <code>CreateParams</code> of the form to some unique value (e.g. GUID), then I would be pretty easily able to find this Window with a big chance it is the one from my application.</p>
  
  <p>Application whose form needs to be found:</p>
  
  <pre><code>procedure TForm1.CreateParams(var Params: TCreateParams);
  begin
    inherited;
    Params.WinClassName := '{1EE65C52-2F4B-4600-AAE2-079C29AD2220}';
  end;
  </code></pre>
  
  <p>The other application which needs to find the form from the previous one:</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
    FormHandle: HWND;
  begin
    FormHandle := FindWindow('{1EE65C52-2F4B-4600-AAE2-079C29AD2220}', nil);
    ShowMessage(IntToStr(FormHandle));
  end;
  </code></pre>
  
  <p>My question is:<br></p>
  
  <p>Is it safe to change this member of the <code>TCreateParams</code> to whatever I want or is it unsafe in something ? Or how would you look for a handle of the form from your own another application (not application instance, but your own another application) ?</p>
  
  <p>Thanks a lot!</p>