Hi, I've a class Fmenu.cls with this code:
DEFINE PRIVATE VARIABLE v_NombreClase AS CHARACTER NO-UNDO.
DEFINE PRIVATE VARIABLE childForm AS Progress.Windows.Form NO-UNDO.
v_NombreClase = Cliente.Comun.FMenu.
childForm = DYNAMIC-NEW v_NombreClase().
WAIT-FOR System.Windows.Forms.Application:Run(childForm).
But when close the window this appear this message System.InvalidOperationException: Operacion no valida dato el estado actual del objeto. Why???
But when close the window this appear this message System.InvalidOperationException: Operacion no valida dato el estado actual del objeto. Why???
Spanish? Any chance for a translation?
Which version?
Anything special in the Form?
Version: 10.2B02
Translation (more or less):Invalid Operation given the current state of the object
Only thing is the form is a MDI Container
IF I called this form with WAIT-FOR childForm:ShowDialog(), It worked, but I read that is better called to form with WAIT-FOR System.Windows.Forms.Application:Run(childForm).
Version: 10.2B02
Only thing is the form is MDI Container
Any chance with the translation?
Version: 10.2B02
Translation (more or less):Invalid Operation given the current state of the object
Only thing is the form is a MDI Container
IF I called this form with WAIT-FOR childForm:ShowDialog(), It worked, but I read that is better called to form with WAIT-FOR System.Windows.Forms.Application:Run(childForm).
Hello Elena,
Since you mentioned that the only thing in the form is the MDI Container, have you tried removing it to see if makes a difference?
Without trying to reproduce the issue, I would suggest to look at the stacktrace shown when using the Help ("Ayuda") button. The stacktrace has the line number.
I am guessing that the message is expected, basically the code is trying to do something that cannot be done when the form is closed.
Knowing what is the statement that is producing this message would help to understand the behavior.
I hope this helps.
I've tried to see what the help but does not say anything you do not know.
I have no code in the event that closes the window, so it can not be due.
The window must be MDI Container, because it is a menu window where we want to go into all the screens, so I can not put out the code.
Anyway, thanks for your help.