title: Accesing Values From One Form on Another
body: <p>Im trying to build in a language switch into one of my programs.</p>
  
  <p>Where the user selects a language and in runtime the app gets translated. I sort of got this working in a small test project. BUT only when the forms are auto created, which i dont want.</p>
  
  <p>the way the forms get created is the following:</p>
  
  <p>SideNote: Most of my forms are fsMDIChild forms.</p>
  
  <pre><code>ParametersForm := TParametersForm.Create(Self);  //(consider this the mainform for now)
  </code></pre>
  
  <p>On ParametersForm I have</p>
  
  <pre><code>procedure TParametersForm.FormCreate(Sender: TObject);
  begin
   ResourceStringsDM.ParametersF; //(consider this the second form)
  end;
  </code></pre>
  
  <p>this Datamodule houses the captions for ParametersForm.</p>
  
  <pre><code>procedure TResourceStringsDM.ParametersF;
   begin
     with ParametersForm do
     begin
      bsSkinLabel1.Caption := 'Execute Nieuwefacturen';
      bsSkinLabel2.Caption := 'Execute Viewfacturen';
     end;
   end;
  </code></pre>
  
  <p>I have added ResourceStringsDM to the implementation uses of ParametersForm and ParametersForm to the interface uses of ResourceStringsDM.</p>
  
  <p>This all above gives me an access violation cause in the procedure where it sets the captions uses ParametersForm (var name of the form i want to translate) but at that moment this var is nil. Prolly cause it isnt done creating the form yet and hasnt filled in the form var.</p>
  
  <p>The only way i got this all working was by using</p>
  
  <pre><code> Application.CreateForm(TParametersForm, ParametersForm); 
  </code></pre>
  
  <p>But I want to avoid this after reading about it, and that you should only use this on your mainform. Also it doesnt handle passing parameters very well.</p>
  
  <p>Does anyone of you fine people have any hints or tips / help to get me access to the captions of form 1 from form 2?</p>
  
  <p>i probably forgot tons of info you guys need. just tell me and ill add it in.</p>