program two_controls; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset Forms, mainf, castle_components { you can add units after this }; {$R *.res} begin Application.Initialize; Application.CreateForm(TMain, Main); Application.Run; end.