Progress KB - 4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?




Feedback
Did this article resolve your question/issue?

   

Article

4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?

« Go Back

Information

 
Title4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?
URL NameP174599
Article Number000150731
EnvironmentProduct: OpenEdge
Version: 10.2x, 11.x, 12.x
OS: Windows
Other: .Net
Question/Problem Description
4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?
How to run a .NET Form from an ABL window?
Can we make a .NET Form a child of an ABL window?  If yes, how?
Can a .NET Form be an MDI child of an ABL window?  If yes, how?
Can an ABL window be the MDI parent of a .NET Form?  If yes, how?
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
1.  The following code snippet shows one way of calling, i.e. running, a .NET Form from from an ABL window (.w) or an ABL procedure (.p):

DEFINE VARIABLE vForm AS CLASS myForm NO-UNDO.
vForm = NEW myForm().
vForm:show().
WAIT-FOR System.Windows.Forms.Application:Run(vForm).


2.  Yes, a .NET Form can be a child for an ABL window.  Use the ProWinHandle attribute to make set an ABL window as the parent of a .NET Form .  For example:
 

DEFINE VARIABLE vForm AS CLASS myForm NO-UNDO.
vForm = NEW myForm().
vForm:ProWinHandle:PARENT = CURRENT-WINDOW.
vForm:show().
WAIT-FOR System.Windows.Forms.Application:Run(vForm).

Please note the above code does not establish an MDI parent/child relationship between the CURRENT-WINDOW and the .NET Form vForm.  The ABL window, CURRENT-WINDOW, will be the parent of the form, vForm, but the form will not be contained within the ABL window. The behavior this form of parenting gives you is that the child (vForm in this case) is hidden when the parent ABL window is minimized.

3.  No, a .NET Form cannot be an MDI child of an ABL window. You can embed an ABL window in a .NET MDI child form but you cannot make an ABL window an MDI parent of a .NET Form.

Workaround
Notes
Last Modified Date10/30/2019 7:33 PM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.