i started creating application only using dpr file in delphi 2009 , i think all basic things work i use system ,sysutils and more.... but now i want to use timer and some other non-visual components (some basic indy components to use internet) is there any ways to do this i do not bother using units (but not forms)
2 Answers
You can create any component by calling its constructor and passing nil as the owner. You won't need a parent form if you manage it yourself. But for some things, you will still need a project that uses forms, even if you're not placing your component on one. For TTimer, for example, you have to be running a VCL Forms app because it depends on Application and its message loop to make the timer work.
1 Comment
Remy Lebeau
You do not need a VCL Forms app in order to use TTimer. As long as there is a message loop that receives and dispatches WM_TIMER messages for the thread context that TTimer runs in, it will work fine. You can call the Win32 API Get/PeekMessage() and DispatchMessage() functions directly for that.