Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove & restore toolbars
Message
From
20/07/2006 12:06:19
 
 
To
20/07/2006 00:29:46
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01137839
Message ID:
01138118
Views:
12
Thanks Agnes. That adds a little more. Kurt's code worked fine after I added the missing line to flag the existing toolbars as .t. so they could be restored.

- Don

>Hi,
>
>if you like you can do also:
>
>
>#DEFINE dcWIN_COMMAND_LOC              "Command"
>#DEFINE dcWIN_Properties_LOC           "Properties"
>#DEFINE dcWIN_Document_LOC             "Document view"
>
>*...
>
> this.aToolBars(12,1) = dcWIN_COMMAND_LOC
> this.aToolBars(13,1) = dcWIN_Properties_LOC
> this.aToolBars(14,1) = dcWIN_Document_LOC
>
>
>Agnes
>>>If we have an application with forms that run inside of _SCREEN, can someone tell me how to identify and remove any toolbars that may be open in the _SCREEN when the application starts, and then restore them when the application quits?
>>>
>>>
>>>Thanks for any help.
>>
>>Don,
>>
>>To hide toolbars
>>
>>*	Release all Visual FoxPro toolbars
>>
>>#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"
>>#DEFINE WIN_COMMAND_LOC "Command"
>>
>>	LOCAL i
>>	DIMENSION this.aToolBars[11,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)
>>		IF WVISIBLE(this.aToolBars[i,1])
>>			Hide Window (this.aToolBars[i,1])
>>		ENDIF
>>	ENDFOR
>>
>>and to restore toolbars
>>
>>	LOCAL i
>>
>>	*	Show all VFP toolbars that were previously hidden
>>	FOR i = 1 TO ALEN(this.aToolBars,1)
>>		IF this.aToolBars[i,2]
>>			Show Window (this.aToolBars[i,1])
>>		ENDIF
>>	ENDFOR
>>
>>This code is what we use in an application that was written in VFP6 so I don't know if there are any additional toolbars in newer versions.
>>
>>Hope this helps,
>>Kurt
Previous
Reply
Map
View

Click here to load this message in the networking platform