Creating an Application

The first step to creating an application is to create the interface, the visual part of the application with which the user will interact. Forms and controls are the basic building blocks used to create the interface; they are the OCX objects that you will work with to build your application.

Note - In GFA-BASIC 16 bit the interface was created using windows and dialog boxes that were created using special commands like OpenW, ChildW, ParentW, and Dialog. These commands are still available, but create Form objects as well. GFA-BASIC 32 application windows are always Form objects now.

OCX objects

Forms and controls are wrapped in OLE objects, called OCX objects. OLE controls are also known as OCX controls or ActiveX controls. However an OLE object doesn't need to have a visible aspect; it may be invisible at run time. OCX is a natural development of the older VBX extension that use older technology and are found in applications written in earlier versions of Visual Basic.

GFA-BASIC 32 implements all standard and custom controls, forms (windows and dialog boxes), and many other features in OCX objects. OCX objects are kind of object-oriented objects wrapped using OLE techniques. OLE controls are often provided in dynamic link libraries with an .OCX extension. That's why the run-time library of GFA-BASIC 32 is called GfaWin32.OCX.

Forms are OCX objects that expose properties which define their appearance, methods which define their behavior, and events which define their interaction with the user. By setting the properties of the form and writing code to respond to its events, you customize the object to meet the requirements of your application.

Controls are OCX objects that are contained within form objects. Each type of control has its own set of properties, methods, and events that make it suitable for a particular purpose. Some of the controls you can use in your applications are best suited for entering or displaying text. Other controls let you access other applications and process data as if the remote application was part of your code.

You work with forms and controls, set their properties, and write code for their events at design time, which is any time you're building an application in the GFA-BASIC 32 environment. Run time is any time you are actually running the application and interacting with the application as the user would.

Next:Using Forms

Using OCX Controls

Using Event Procedures

Accessing HTML Help Files

Dpi-aware applications

Direct2D applications

{Created by Sjouke Hamstra; Last updated: 16/05/2020 by James Gaite}