Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generic VCRtoolbar in all forms
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00672449
Message ID:
00672478
Views:
8
Juan,

Create a property of the toolbar that keeps track of how many forms are open, then in the init of each form, increment that property by one. Then in the destroy method of the form, you can decriment that value by one and if the value is zero, release the toolbar.

The tastrade example that ships with VFP does exactly the same thing so you may want to check out the sample code. The main classes to check out are the tsbaseform and application classes.

Kurt

>Hi all...
>I made a generic VCRtoolbar to use it in any form my app. load. That is when I press the > button it call a procedure in the _VFPActive form that skip 1 record. That works so good. When the form is loaded, it show and dock the toolbar and when the form is unload it Hide the toolbar, right at this point. My problem is this: When the first form is active and a second instance of the form is loaded the toolbar acts on it and when I close the form it unloads the toolbar so the first form looses the toolbar. How to show and hide the toolbar depending on the number of forms active?
>thanks
>Juan Uribe
Previous
Reply
Map
View

Click here to load this message in the networking platform