On 27/08/2014 06:43 AM, Paul Newton wrote:
Well obviously my machine is using the runtimes and his machine is using 
development

Hi Paul,

that is not necessarily the conclusion to be drawn based on the fact that the development toolbars are visible when running your executable. It could be that the runtime is being used on his machines but that your code or resource file does not close the toolbars. That's why Dave suggested using VERSION(2) to determine that.

I use the following code to hide and show toolbars when my application is running, whether in development or runtime (note you should include the toolbar names used in other languages besides English if your application might run on those languages):

DIMENSION _VFPToolbars[11,2]

PROCEDURE HideToolbars

* --- hide VFP toolbars
_VFPToolbars[1,1] = "Form Designer"
_VFPToolbars[2,1] = "Standard"
_VFPToolbars[3,1] = "Layout"
_VFPToolbars[4,1] = "Query Designer"
_VFPToolbars[5,1] = "View Designer"
_VFPToolbars[6,1] = "Color Palette"
_VFPToolbars[7,1] = "Form Controls"
_VFPToolbars[8,1] = "Database Designer"
_VFPToolbars[9,1] = "Report Designer"
_VFPToolbars[10,1] = "Report Controls"
_VFPToolbars[11,1] = "Print Preview"

LOCAL _Count
FOR _Count = 1 TO ALEN(_VFPToolbars,1)
   _VFPToolbars[_Count,2] = WVISIBLE(_VFPToolbars[_Count,1])
   IF _VFPToolbars[_Count,2]
      HIDE WINDOW (_VFPToolbars[_Count,1])
   ENDIF
ENDFOR


PROCEDURE ShowToolbars

* --- display the toolbars that were visible initially
FOR _Count = 1 TO alen(_VFPToolbars,1)
    IF _VFPToolbars[_Count,2]
        SHOW WINDOW (_VFPToolbars[_Count,1])
    ENDIF
ENDFOR


--

Frank.

Frank Cazabon


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to