Creating a Project without Forms

To start a new project for a formless application, use the Windows CE Formless Project template. When you open a formless project, the toolkit prompts you to choose a Platform Manager configuration, including the target device on which you intend to run your application. The list of available target devices depends on the platform you choose.

Initially, formless projects contain one module, modMain. The startup object for a formless application is an empty procedure in modMain called Sub Main.

All code for a formless project is contained in code modules, and all controls must be ActiveX controls created with the CreateObject or CreateObjectWithEvents functions. Because all intrinsic controls are provided in the forms package, you cannot use them in a formless application.

Additionally, formless projects support only the App object and the Err object. In Visual Basic 6.0, formless applications typically proceed from beginning to end without waiting for events. In the toolkit, the App object provides two additional methods, WaitForEvents and EndWaitForEvents, to enable formless applications to process events.

Use the WaitForEvents method to halt execution of code in a module. Your application waits for events and calls the appropriate event procedure. To continue execution of code in the module, call the EndWaitForEvents method in your event code for an ActiveX control. Use the CreateObjectWithEvents function to create ActiveX controls that respond to events. The following section provides more information about using controls and events during your design implementation.