Try OpenEdge Now
skip to main content
GUI for .NET Programming
Using .NET Forms with ABL Windows : Embedding ABL windows in .NET forms : Using the ABL features to embed a window
 

Using the ABL features to embed a window

To embed ABL windows in .NET forms, ABL provides a mechanism based on two OpenEdge .NET classes and an associated property:
*Progress.Windows.MDIChildForm class — This is a form class based on Progress.Windows.Form that is specifically designed to embed the client area of one ABL window in an MDI child form.
*Progress.Windows.WindowContainer class — This is a control container class based on System.Windows.Forms.UserControl that can embed the client area of one ABL window in a .NET user control. You can then add this user control to a form in order to embed the ABL window in the .NET form. Using multiple WindowContainer objects, you can embed multiple ABL windows in a single .NET form.
*EmbeddedWindow property — This is a HANDLE property on both the MDIChildForm class and the WindowContainer class that contains the handle of the ABL window whose client area is embedded in the respective .NET control container.
To embed an ABL window in a .NET form, you begin by setting the EmbeddedWindow property of the appropriate object to the handle of the window whose client area you want to embed. Once you have set this property, the behavior of the ABL window you have embedded, as noted previously, changes. For more information on these changes, see the EmbeddedWindow property entry in OpenEdge Development: ABL Reference.
Each .NET class for embedding ABL windows (MDIChildForm and WindowContainer) requires a different procedure for embedding and displaying the client area of a window in a form. Once you have done this, you can work with the .NET form and its controls using .NET properties, methods, and events, and you can work with the embedded widgets using the same code you used before. The sections that follow describe how to use each of these classes to embed windows in a form.