About developing lazarus / 8-Other ---------------------------------------------------------------------- xcoder · 2009-09-14 18:37 Hello! I don't know where should I have put this topic. But maybe someone can help me, I have 2 problems: I want to create a clock using a label!     How can I refresh the label every second or some kind of other interval? I need to open a child window!     How can I do that, didn't find any instructions, maybe wasn't looking hard enough? Best regards! ---------------------------------------------------------------------- skalogryz · 2009-09-14 19:50 See Examples directory in lazarus, to get an idea on how components and controls work! Quote from: xcoder on September 14, 2009, 08:37:11 pmI want to create a clock using a label!     How can I refresh the label every second or some kind of other interval? add TTimer on the form. set Interval to 1000. Enabled the timer; Create OnTimer event and change Label's caption inside the event. Quote from: xcoder on September 14, 2009, 08:37:11 pmI need to open a child window!     How can I do that, didn't find any instructions, maybe wasn't looking hard enough? add Unit2 (the unit where child form is declared) to the main form unit's uses section. add to your code.   Form2.Show; ---------------------------------------------------------------------- xcoder · 2009-09-14 21:33 Thank you! Everything worked! Again Thanks! ---------------------------------------------------------------------- alter · 2009-09-28 18:17 Just for future. Form2.Show worked because it's been put as autocreate form (it's created during startup). If for some reason you don't want to create it during startup then code looks different: Code: [Select]var f: TForm2 begin   f:=TForm2.Create(Self);   f.Show; end;But remember then to free windows as soon as you don't need it anymore.