I have form A which consists of a list. The user can select an item
from the list and click on a button. The idea is that this will bring
up form B, prefilled with some data about the item that the user had
selected on form A.
My question is, what is the best way of determining which item the
user selected when initializing form B? The two options I think are:
1. After capturing the button-click event on form A, stick the user
selection in a global variable. Then open form B, and during form B's
initialization look at the global variable.
2. I'm not sure if this is possible, but - during form B's
initialization, access the list directly on form A. I suspect this
would require keeping a handle to form A in a global variable.
Or is there some other, better approach?