Some of my forms change caption when the user selects a new patient.
When the form is closed, the form's name is not cleared from the Window popup.
This is apparently because the remove function in oApp.oMenu.oWindowPad.oPopup looks for the caption name to release it, but since the caption name has changed, it is not found, and not cleared.
My solution is to clear the old form name in my thisform.refresh, change the caption, and then add the item to the menu as follows:
If TYPE("goApp.oMenu.oWindowPad.oPopup.Name") == "C" goApp.oMenu.oWindowPad.oPopup.Remove(This.Caption, "cCaption") Endif
Thisform.CAPTION = time()
If TYPE("goApp.oMenu.oWindowPad.oPopup.Name") == "C" goApp.oMenu.oWindowPad.oPopup.Add( "oWindowPad", This.cWindowBarClass, This.Caption, This.Name ) Endif
From what I've seen, this should apply to versions 6.0 and 6.1. ©2001 Paul Wilford |