Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detect multiple activation of form
Message
 
 
To
19/02/2004 12:22:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00878119
Message ID:
00878812
Views:
27
Nancy,

And it's a relatively easy thing to implement. The treeview form hands a thisform reference to the child form. The child form stores the name of the treeview form, creates a unique name for itself and calls back to a RegisterChildForm() telling it the nodeno and uniquename for itself. When the child form closes it iterates the _screen.Forms[] collection looking for the name it saved and when it finds it, it calls back to the UnregisterChildForm() method. The treeview form maintains an array of these child form names and nodenos that it can use to refind the child form by using _screen.Forms[] to bring it back forward or to close them all down without saving should the user click cancel from the treeview.

I use names instead of object references just because it makes life easier by preventing order dependent destruct sequencing.

>Interesting example, since it's something a friend and I have talked about for years, in a particular context of organizing information. There may be a bit of information that can be referenced any number of ways. It would be nice to have virtual tree nodes for each logical location. Each time you mine a virtual node, on instance would open, or an already open instance would come to the foreground.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform