Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Toolbar hide and show problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01103373
Message ID:
01103416
Vues:
18
>Lets say I have 3 forms open. Each one will use the toolbar if it the active form. If I minimize all three I want the toolbar to be hidden. How do I get that right
Than you could deal with you main Application object add Properties nShowBarForms and oToolBar, Add metods named ShowToolBar, RemoveToolBar:

in Init oif the application object:
Set nShowBarForms = 0
Set oToolBar = NULL

In all forms where you use this ToolBar put:
oApp.ShowToolBar() && Where oApp is your main applciation object

in destroy event of that forms put:
oApp.RemoveToolBar() && Where oApp is your main applciation object
*** oApp ShowToolBar Method:
IF NOT ISNULL (this.oToolBar)
   this.oToolBar = CREATEOBJECT([ToolBarObject])
ENDIF
this.nShowBarForms = this.nShowBarForms + 1

*** oApp RemoveToolBar Method:
this.nShowBarForms = this.nShowBarForms - 1
IF this.nShowBarForms < 1
   this.nShowBarForms = 0
   this.oToolBar.Destroy()
   this.oToolBar      = NULL
ENDIF
Then in Resoze Event of each form taht uses ToolBar put:
IF this.WindowState = 1
   oApp.RemoveToolBar()
ELSE
   oApp.ShowToolBar()
ENDIF
something like that (not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform