[Resuelto] I want to close the open VM using a special Close Button
hiren.ectech has published:
I have just started with Myopenlab, which is a wonderful open IDE with graphical programming.
For my project, I need multiple VMs and a Switch board to launch them as needed.
Now, I want to close the open VM using a special Close Button (not the "X" in the title bar). But I am not able to locate any element which can help me do it.
Your help will be much appreciated.
To Programmatically closes the VM you can use "System Control" > "App_Abort_JV" Element.
That element Closes the Windows if the Boolean Input is True.
There is an example at Projects window of MyOpenLab > "VirtualMachines>English Examples>Application_Control>Abort_App_JV_Example"
Thanks Javier for your quick reply
Correct me if I am wrong, the element you indicated will close all the windows at the same time. But I need to close only one window.
Like I press a button on the window and only that window closes.
Thanks in advance,
You are right, this "ABORT" element was only to close all VMs (Quit the Java VM)....
If you want close only one windows please try with this Preview Element Update attached.
Only replace the .class file at the next folder:
Then start MyOpenLab and you will see three new input pins in the element, the first pin will be to Abort the Java Machine, the second pin will be to Dispose the Window and the third pin will be to set the Window Visible Property equals to the boolean input value (If true or null the window is Visible If False The window will be invisible).
I will test and update the element in the next distribution.
It worked like a charm, you are wonderful.
Thanks a lot for your support.
Seems like a bug....
I updated the element as per your instruction, It worked perfectly for a VM if i run it using "Start VM" button. I am able to close the window by pressing a dedicated button on the window (other than "X" in title bar).
However, if I call the same VM in some other VM using subVM element, It doesn't close by pressing the same button.
I have also noted that once the VM is closed, I have to manually stop the execution of the VM.
Need your help to resolve this...
Thanks & Regards,
I am sorry for poking you....In fact, I desperately need this feature...
My project is on hold due to this limitation. Your help is deeply solicited.
Thanks in advance,
Try this Preview Update. (It works for Distributions too, but not supports Modal Windows still).
Thanks for responding...I will git it a try immediately and let you know the result.
I just now checked it and it works perfectly for my purpose.