We have already seen that setting a parent-child relationship between two windows is a handy way to combine two windows. You can also combine two windows by making the memory screen of one be the destination of the other. This has certain advantages of its own, as we shall see.
For instance, Vermont Views combines a memo field's window with a form's window by setting the memo window's destination to be the form's memory screen. To show why this is better than a parent-child relationship in this case, let's examine what would happen if the memo were a child of the form.
First, we would want it so that if the form is hidden and we bring it to the top, the memo will also come to the top. This is automatically done for child windows, so there is no problem. Second, we would want to have the memo move with the form. Again, this is automatic for child windows.
The problem arises from the fact that the child always remains on top of a parent and the parent's data will scroll underneath a child if necessary. For basic forms, this is no problem, because the form cannot scroll. However, consider the case of a virtual form, where the form window is small and moving from field to field will scroll the form's information. Since the memo is a child of the form, the data on the form will scroll underneath the child window. The memo will not move as the form scrolls, and thus a field could slide under the memo. This would be extremely confusing to the user. Also, since the memo is a child, its window could be dragged around on the form, essentially moving the location of the memo. Again, this is probably not a desirable feature.
By setting the memo's destination to the form's memory screen, we avoid these problems. The memo is associated with a particular location in the form's memory screen. When the form is scrolled, the memo will scroll with it. The relative positions of the memo and the surrounding fields are maintained. In addition, if the form is dragged, the memo will be dragged as well. This technique has an advantage over the parent-child relationship, because it maintains a relationship between the memo and the other items on the form.