Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Sam
  Where is Sam?
 HK
 Hong Kong
 Sam
 To: Sam
  Where is Sam?
 HK
 Hong Kong
 Sam
 Tags
Subject: Question about the code, Eric
Thread ID: 15842 Message ID: 15892 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Thursday, October 03, 2002 3:56:41 AM         
   


Method 1 -"Release window" is ok, but method2 - "for each" doesn't.
I have 2 toolbars displayed on screen and run the following code on screen. Nothing happen. What was missing in my settings?

 FOR EACH loToolbar IN _vfp.forms
    IF loToolbar.class = "Toolbar" OR loForm.baseclass = "Toolbar"
       loToolbar.release
    ENDIF
 ENDFOR


If I change "loToolbar.release" to "?loToolbar.caption", nothing was printed. Could you tell me why?
Thanks in advance.

> > > Hi all,
> > > Does anyone know how to close all toolbars (built-in or user-defined) with commands? So that users no need to close one by one.
> > >
> > > Thanks in advance.
> > > SAM
> >
> > * to release built-in toolbars, for example the Standard toolbar
> > RELEASE WINDOW "Standard"
> > * or for example the Form Designer toolbar
> > RELEASE WINDOW "Form Designer"
> > * you must pass the toolbar caption to the RELEASE WINDOW command
> > * this technique works for user defined toolbars too.
> > * another way to release user defined toolbars is:
> > FOR EACH loToolbar IN _vfp.forms
> > 	IF loToolbar.class = "Toolbar" OR loForm.baseclass = "Toolbar"
> > 		loToolbar.release
> > 	ENDIF
> > ENDFOR
> > 

> > --
> > Eric den Doop
> > www.foxite.com - The Home Of The Visual FoxPro Experts
>
>
> SAM


SAM

ENTIRE THREAD

Closing Toolbars Posted by Sam @ 10/2/2002 6:42:04 AM
RE: Closing Toolbars Posted by Eric den Doop @ 10/2/2002 7:40:46 AM
Thanks a lot, Eric. Posted by Sam @ 10/3/2002 3:01:07 AM
Question about the code, Eric Posted by Sam @ 10/3/2002 3:56:41 AM
RE: Question about the code, Eric Posted by Eric den Doop @ 10/3/2002 9:28:16 AM
RE: Question about the code, Eric Posted by Sam @ 10/4/2002 2:09:17 AM
RE: Question about the code, Eric Posted by Karben Selim Mejia @ 10/4/2002 4:51:51 PM
the code could not run in vfp6, Eric and Mejiaks Posted by Sam @ 10/5/2002 3:53:42 AM
RE: the code could not run in vfp6, Eric and Me... Posted by Karben Selim Mejia @ 10/5/2002 5:52:05 AM