Hi,
Common Lazarus project source code contains this snippet:
begin  Application.Initialize;
  Application.CreateForm(TForm, Form1);  Application.Run;end. 

Adding code to modify or add components of/into Form1 after the Application.Run 
method will be ignored because it's out of the application's main thread. So, 
is there a correct and safe way to do it?
begin  Application.Initialize;
  Application.CreateForm(TForm, Form1);  Application.Run;  // how to make below 
code be executed?  Form1.Caption := 'My caption';  Form1.Edit1.Text := 'My text 
input';  MyLabel := TMyLabel.Create(Form1);  MyLabel.Parent := Form1;  
MyLabel.Caption := 'My runtime label';  // or one could add any arbitraty code 
hereend. 
 Thank you. :)
Regards,
–Mr Bee
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to