Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Hiding Toolbars
Message
From
20/04/1999 15:13:24
 
 
To
20/04/1999 14:28:22
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00210226
Message ID:
00210254
Views:
36
>Is there any simple way to hide all of the toolbars currently open in VFP to run an app?
>
>Right now, It seems like I have to know the names of the toolbars to check them with WEXIST(), which means I need to know in advance the possible names.

I ( and I believe most ) use a method in their appilcation object to get rid of them on startup then restore if necessary on shutdown. The code I use is below and was taken directly from the MS Tastrade application object with perhaps some minor tayloring to my situation:
*-- Releases all Visual FoxPro toolbars
LOCAL i

*-- Toolbar names
#DEFINE TB_FORMDESIGNER_LOC  "Form Designer"
#DEFINE TB_STANDARD_LOC      "Standard"
#DEFINE TB_LAYOUT_LOC        "Layout"
#DEFINE TB_QUERY_LOC        "Query Designer"
#DEFINE TB_VIEWDESIGNER_LOC  "View Designer"
#DEFINE TB_COLORPALETTE_LOC  "Color Palette"
#DEFINE TB_FORMCONTROLS_LOC  "Form Controls"
#DEFINE TB_DATADESIGNER_LOC  "Database Designer"
#DEFINE TB_REPODESIGNER_LOC  "Report Designer"
#DEFINE TB_REPOCONTROLS_LOC  "Report Controls"
#DEFINE TB_PRINTPREVIEW_LOC  "Print Preview"

DIMENSION this.aToolBars[10,2]
this.aToolBars[1,1] = TB_FORMDESIGNER_LOC
this.aToolBars[2,1] = TB_STANDARD_LOC  
this.aToolBars[3,1] = TB_LAYOUT_LOC
this.aToolBars[4,1] = TB_QUERY_LOC
this.aToolBars[5,1] = TB_VIEWDESIGNER_LOC
this.aToolBars[6,1] = TB_COLORPALETTE_LOC  
this.aToolBars[7,1] = TB_FORMCONTROLS_LOC
this.aToolBars[8,1] = TB_DATADESIGNER_LOC
this.aToolBars[9,1] = TB_REPODESIGNER_LOC
this.aToolBars[10,1] = TB_REPOCONTROLS_LOC

*this.aToolBars[11,1] = TB_PRINTPREVIEW_LOC

FOR i = 1 TO ALEN(this.aToolBars, 1)
	this.aToolBars[i,2] = WVISIBLE(this.aToolBars[i,1])
	IF this.aToolBars[i,2]
		HIDE WINDOW (this.aToolBars[i,1])
	ENDIF
ENDFOR
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform