Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control form instance activated by menu
Message
From
26/02/2003 23:42:51
 
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
00758519
Message ID:
00758577
Views:
20
>I'm using Define Bar ... Prompt thisform.caption to add open instances of a form to the menu. The caption includes info to identify the record displayed in the form and changes each time the form is requeried. When the user makes a selection, the On Selection ... needs the window name for the Activate Window command. I can't use the form name in this situation because it is not unique. How can I get the window name?

One approach is to append an instance number to each form's title e.g. MyForm:1, MyForm:2, etc. Some frameworks with their own form manager classes do this.

You might also be able to work with the VFP Forms collection e.g. if the user picks the second of 3 instances of FormX from the menu, parse the Forms collection to find the desired form instance.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform