It sounds like you're wanting to write a console program, but without any clues as to what you're trying to do, it's just a guess. In Delphi, go to File, New, Other and then choose Console. A console application doesn't come with any forms. You can create non-visual components in your code, but you'll be responsible for destroying them as well.
One of the problems with non-visual components is attaching methods to their events. You can get around this by simply creating a descendant component that overrides the appropriate method, eg. instead of trying to attach to OnExecute, dig into the component source and you'll find it probably has a protected method call DoExecute that checks the OnExecute property. Just override the DoExecute method in your descendant component with the code you want to run.
Console programs are designed to run once through their main begin..end block and then quit, which sounds like what you're after.