Work with .NET forms and controls
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
In the code example that follows, the first
line defines an object reference for a form as the Progress.Windows.Form class.
The Form class is contained in the Progress.Windows namespace,
as shown:
|
In this example two .NET objects are created,
one for a form (FormObjectRef) and one for a .NET button (helloBtn).
The NEW statement is used to create an instance
of the .NET form and button objects and assign them to variables.
The "Hello World" string is assigned to the button's Text property. Finally,
the helloBtn button object is added to the form's
control collection. Even though helloBtn is a .NET object,
it can be used in ABL, for example displaying its property in a MESSAGE statement.
The fact that helloBtn is a .NET object is
transparent when working in ABL.