Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
App won't run with themes .T.
Message
From
21/07/2009 08:02:36
John King
Integrated Technologies Group
Florida, United States
 
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01413511
Message ID:
01413517
Views:
83
Actually I discovered themes as the possible cause by accident. I am converting an old vfp6 app to vfp 9 app and we use an update routine before running the app that simple looks on the server for an update to the app and views then if there is one it copies either the new exe or the views to the workstation. The old vfp 6 start program does not turn themes on before doing it's thing and the app runs ok but without themes on. if I try running the new vfp9 start program that is exactly the same as the vfp 6 start program except with the SYS(2700,1) code.

The old prg we are still using to syn the workstations is:
** 5/23/09 - jdk . . turns on theme support for v5.0 Products

SYS (2700,1)


now the app still won't run if I try to run it directly without using the old start program. weird. It works fine on my network and yes I tried two pc's same thing.

LOSE DATABASES
 
** 5/23/09 - jdk . . turns on theme support for v5.0 Products

SYS (2700,1)

**********************

lcOldsafe = SET('safety')
lcOldtalk = SET('talk')

SET TALK OFF
SET SAFETY OFF
SET EXCLUSIVE OFF
SET MULTILOCKS ON
 
lcCurrDir = SYS(5)+SYS(2003)+'\'

IF FILE("calocal.dbf")
   =l1Dbopen('caLocal')
   SELECT calocal
   LOCATE
   IF NOT EOF()
      lcCurrDir = ALLTRIM(gcHome)
      exEdir = ALLTRIM(gcExefiles)
      ENDIF
      
       ELSE
       
   lcCurrdir = SYS(5)+SYS(2003)+'\'
   lcTable = lcCurrdir+'calocal.dbf'
   CREATE TABLE (lcTable) (gcHder C(50), gcHome C(50), gcPath C(240),;
                gcExefiles C(60), gcSite C(30), gcInstall C(60),;
                gcCcmailex C(60), gcUserid C(10), gcDatafile C(60))
                
   SELECT calocal
   APPEND BLANK
   REPLACE gcHder WITH 'QES CAS - Corrective Action System'
   REPLACE gcHome WITH lcCurrdir
   lcSys0 = SYS(0)
   lnLen = LEN(ALLTRIM(lcSys0))
   lnPosition = ATC('#', lcSys0)
   lcUserid = ALLTRIM(RIGHT(lcSys0, lnLen-lnPosition))
   REPLACE gcUserid WITH lcUserid
   IF FILE('Install.ini')
      lnFilehndl = FOPEN('INSTALL.INI', 10)
      inStalldir = FGETS(lnFilehndl)
      IF RIGHT(ALLTRIM(inStalldir), 1)<>'\'
         inStalldir = ALLTRIM(inStalldir)+'\'
         ENDIF
      REPLACE gcInstall WITH ALLTRIM(inStalldir)
      dbFdir = ALLTRIM(inStalldir)+'DBFS\'
      exEdir = ALLTRIM(inStalldir)+'EXEFILES\'
      ff3dir = ALLTRIM(inStalldir)+'FOXFIRE\'
      rePtdir = ALLTRIM(inStalldir)+'REPORTS\'
      stAticdir = ALLTRIM(inStalldir)+'Static\'
      loCaldir = lcCurrdir+'local\'
      lcPath = lcCurrdir+';'+loCaldir+';'+dbFdir+';'+ff3dir+';'+rePtdir
      
      REPLACE gcPath WITH lcPath
      REPLACE gcExefiles WITH ALLTRIM(exEdir)
      REPLACE gcDatafile WITH ALLTRIM(stAticdir)
      ENDIF
   ENDIF


lcUpdateFile = .F.

neTexe = exEdir+'CAS9000.EXE'

lnNumFound=ADIR(laNetexe, neTexe)



IF lnNumFound < 1
   MODIFY WINDOW SCREEN NOCLOSE NOMINIMIZE NOGROW
   SET SYSMENU OFF
   SET STATUS BAR OFF
   DO FORM badstart
   RETURN
   ENDIF           

loCalexe = lcCurrdir+'CAS9000.EXE'
mnumfiles = ADIR(laLocalexe, loCalexe)

DO CASE
   CASE mnumfiles < 1
        lcUpdateFile = .T.
   
   OTHERWISE
        localsize = laLocalexe(1,2)
        localdate = DTOS(laLocalexe(1,3))
        localtime = laLocalexe(1,4)
        IF NOT EMPTY(calocal.gcExefiles)
           netsize = laNetexe(1,2)
           netdate = DTOS(laNetexe(1,3))
           nettime = laNetexe(1,4)
           
           IF neTdate+neTtime>loCaldate+loCaltime
              lcUpdateFile = .T.
              ENDIF
           ENDIF
   ENDCASE
         
IF lcUpdateFile         
   lnReturn = diAlog('INFO','The CAS9000.exe has been updated.  '+ ;
                     'The program will download the new CAS Program', ;
                     'Download new CAS9000.exe')
   COPY FILE (netexe) TO (localexe)
   ENDIF
    
   
DO staticfiles
CLOSE ALL
SET DEFAULT TO (lcCurrdir)
SET SAFETY ON
SET TALK OFF
DO CAS9000.exe


**************************************************
PROCEDURE StaticFiles

lcNetdir = ALLTRIM(gcInstall)+'\STATIC\'
lcLocaldir = lcCurrdir+'local\'
SET DEFAULT TO (lcLocaldir)
CREATE CURSOR checksiz (taBle C (12), loCaldate C (20), neTworkdat C (20))
*INSERT INTO checksiz (taBle) VALUES ('CASLABEL.DBF')
INSERT INTO checksiz (taBle) VALUES ('VIEWS.DBC')

x = ADIR(laLocaldbf)
IF x > 0
   SET DEFAULT TO (lcNetdir)
   =ADIR(laNetdbf)
   SELECT chEcksiz
   SCAN
   m.loCalsize = 0
   m.neTworksiz = 0
   lnElem1 = ASCAN(laLocaldbf, ALLTRIM(chEcksiz.taBle))
   IF lnElem1>0
      lnRow = ASUBSCRIPT(laLocaldbf, lnElem1, 1)
      M.loCalsize = laLocaldbf(lnRow,2)
      loCaldate = DTOS(laLocaldbf(lnRow,3))
      loCaltime = laLocaldbf(lnRow,4)
      REPLACE chEcksiz.loCaldate WITH M.loCaldate+M.loCaltime
            
          ELSE
          
      IF chEcksiz.taBle = 'VIEWS.DBC'
         REPLACE chEcksiz.loCaldate WITH '0000000000:00'
         ENDIF      

      ENDIF
      
   lnElem2 = ASCAN(laNetdbf, ALLTRIM(chEcksiz.taBle))
   IF lnElem2>0
      lnRow = ASUBSCRIPT(laNetdbf, lnElem2, 1)
      M.neTworksiz = laNetdbf(lnRow,2)
      neTdate = DTOS(laNetdbf(lnRow,3))
      neTtime = laNetdbf(lnRow,4)
      REPLACE chEcksiz.neTworkdat WITH M.neTdate+M.neTtime
      ENDIF
      
   IF chEcksiz.neTworkdat > chEcksiz.loCaldate .AND.  .NOT.  ;
      EMPTY(chEcksiz.loCaldate) .AND.  .NOT. EMPTY(chEcksiz.neTworkdat)
      WAIT WINDOW NOWAIT ALLTRIM(chEcksiz.taBle)+ ;
         ' is being updated from the network table.  Please Wait!'
         
      DO CASE
         CASE 'DBF'$chEcksiz.taBle
              loCalfile = lcLocaldir+ALLTRIM(chEcksiz.taBle)
              neTfile = lcNetdir+ALLTRIM(chEcksiz.taBle)
              USE SHARED (neTfile) ALIAS neTfile IN 0
              SELECT neTfile
              COPY TO (loCalfile) WITH CDX
              USE
              
         CASE 'VIEWS.DBC'$chEcksiz.taBle
              dbCnet = lcNetdir+'VIEWS.DBC'
              dbClocal = lcLocaldir+'VIEWS.DBC'
              COPY FILE (dbCnet) TO (dbClocal)
              dbCnet = lcNetdir+'VIEWS.DCT'
              dbClocal = lcLocaldir+'VIEWS.DCT'
              COPY FILE (dbCnet) TO (dbClocal)
              dbCnet = lcNetdir+'VIEWS.DCX'
              dbClocal = lcLocaldir+'VIEWS.DCX'
              COPY FILE (dbCnet) TO (dbClocal)
              
         OTHERWISE
              WAIT WINDOW 'Unknown file type to update -- contact technical support!'
              
         ENDCASE
      ENDIF
      
   SELECT chEcksiz
   ENDSCAN
   
   ENDIF
   
Thanks for your help.

JDK
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform