Applications with forms can store a control on a form. The control is created when the form is initialized. However, for a formless application you must create a control dynamically and store a reference to the control in a variable. After you assign the new control to the variable, you can use the variable to refer to the objects, constants, methods, and properties of the control.
The following procedure shows how to create a FileSystem control for a formless application.
Dim FS As FILECTL.FileSystem
Dim F As FILECTL.File
Dim D As String
Set FS = CreateObject("filectl.filesystem")
Set F = CreateObject("filectl.file")
F.Open "\test", 2 'Use 2 instead of fsModeOutput
D = FS.Dir("*.*")
F.LinePrint D
F.Close