Recent

Author Topic: LCL WidgetSet and Free Pascal Program  (Read 6693 times)

KillerCode

  • New Member
  • *
  • Posts: 29
LCL WidgetSet and Free Pascal Program
« on: November 27, 2010, 10:13:10 pm »
i Created a new Free Pascal program since i dont need a form, but now i wanna use the widgetset and i dunno what to do?
i tried to inherit the compiler options (save/load) but it wont work :S

i just want any method to use a timer in a free pascal program (formless)
« Last Edit: November 28, 2010, 05:13:54 pm by KillerCode »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCL WidgetSet and Free Pascal Program
« Reply #1 on: November 28, 2010, 05:59:38 pm »
The bad news is that TTimer is a LCL component, so you can't use it without LCL. You can actually use it (through code) without creating any form, but the overhead of LCL code is still there.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9864
  • Debugger - SynEdit - and more
    • wiki
Re: LCL WidgetSet and Free Pascal Program
« Reply #2 on: November 28, 2010, 06:25:38 pm »
you should (not tested) be able to compile the LCL with the "nogui" widgetset.
that reduces the overhead.

Also you can still use a simple "program". But you must add the LCL into the dependencies in the project inspector.

And you must use the unit "Interfaces", and whatever unit contains the timer.
That's all.

KillerCode

  • New Member
  • *
  • Posts: 29
Re: LCL WidgetSet and Free Pascal Program
« Reply #3 on: November 28, 2010, 06:34:10 pm »
ok, ill try that
thanks :)

 

TinyPortal © 2005-2018