Where to give variables a value lazarus / 9-Editor ---------------------------------------------------------------------- T-bear · 2010-06-23 23:52 Hi, Does anyone now where i can give variables a value without clicking a button or something like that? Thanks! ---------------------------------------------------------------------- mirce.vladimirov · 2010-06-24 00:24 If you are using a visual form (a program with a GUI interface) then you can do that when activating the form or when showing the form. ---------------------------------------------------------------------- T-bear · 2010-06-24 00:46 Thank you ill try that. ---------------------------------------------------------------------- Martin_fr · 2010-06-24 02:19 1) use  OnFormCreate event => can be found in object inspector 2) insert your own constructor in "TForm1 = class" Code: [Select]  public   constructor Create(AOwner: TComponent); override; 3) use an initialization section at the end of your unit Code: [Select]... end; // last procedure ended initialization   MyVariable := 1; // or call a procedure like MyInit, and initialize stuff there end.