I have a printer icon on my toolbar. I have a property in my form's base class
lTbrPrint. If it's true then I turn the toolbar on in the form's Activate
method.
I always turn it off when a form is closed. In this way, the user can flip
between forms and the printer icon on the toolbar automatically is turned on or
off depending on whether I decide that there is information that can be printed
from a particular form.
Now the problem....If I decide in the INIT method to close a particular form
and I do a RETURN .F. then the form is closed and the printer icon on the
toolbar is disabled. However (and unfortanately) the Activate method is not
executed.
For example, Form A has the printer toolbar on. Now, the application decides
to attempt to do Form B and in the init method I decide to not instantiate the
form. The toolbar is turned on when From B is destroyed but I think because
Form B's was never Activated, VFP does not do an Activate for Form A.
Can anyone think of a way to handle the problems I'm encountering here?
Thanks.
Mike