Typically, you would write it in the form's OnTerminate event as follows:
|
event OnTerminate()
{
ClearFormMap();
}
|
If you want to close the form map dialog when the target form you are displaying no longer exists, call CloseFormMap in the form's OnTerminate event as follows:
|
event OnTerminate()
{
ClearFormMap();
}
|
Please note that if you forget to write any of the above scripts, the form that you closed will continue to be displayed in the Form Map dialog even though the form no longer exists, and an application error will occur if you try to operate the dialog thereafter.
|