Kbase P174599: 4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/4/2010 |
|
Status: Unverified
GOAL:
4GL/ABL: Is there a way to call a .NET Form (vForm.cls) from ABL window (.w)?
GOAL:
How to run a .NET Form from an ABL window?
GOAL:
Can we make a .NET Form a child of an ABL window? If yes, how?
GOAL:
Can a .NET Form be an MDI child of an ABL window? If yes, how?
GOAL:
Can an ABL window be the MDI parent of a .NET Form? If yes, how?
FACT(s) (Environment):
Windows
OpenEdge 10.2x
FIX:
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.
2. 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.