Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot SHOW WINDOW
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Cannot SHOW WINDOW
Divers
Thread ID:
01276302
Message ID:
01276302
Vues:
67
Hi Gang!

Why does SHOW WINDOW "Standard" work when manually coding (the command window), but not in code?

Here is the Microsoft Code I was using the hide the toolbars of VFP when starting an application, and then restoring them when exiting back to FoxPro for more debugging.

the save code.....
****************************************************
* PROGRAM NAME: TBSAVE.PRG                         *
*--------------------------------------------------*
* This routine saves the status of the system      *
* toolbars in the global array gaTbsets. Call the  *
* procedure TBREST to restore the system toolbars  *
* to their saved state                             *
****************************************************
PROCEDURE TBSAVE
PUBLIC gaTbsets
PRIVATE lnCnt,lnTB
lnTB=11

DIMENSION gaTbsets[lnTB,2]

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

FOR lnCnt=1 TO lnTB
     IF WEXIST(gaTbsets(lnCnt,1))
          gaTbsets(lnCnt,2)=.T.
          HIDE WINDOW (gaTbsets(lnCnt,1))
     ELSE
          gaTbsets(lnCnt,2)=.F.
     ENDIF
ENDFOR

RETURN
and the restore code
*******************************************************
* PROGRAM NAME: TBREST.PRG                            *
*-----------------------------------------------------*
* This routine restores the system toolbars to        *
* their saved state as defined in the array gaTbsets. *
* Save this as TBREST.PRG                             *
*******************************************************
PROCEDURE TBREST

EXTERNAL ARRAY gaTbsets

     PRIVATE lnCnt

     FOR lnCnt=1 TO ALEN(gaTbsets,1)
          IF gaTbsets(lnCnt,2)
               SHOW WINDOW (gaTbsets(lnCnt,1))
          ENDIF
     ENDFOR
     RETURN
Any ideas? Thanks!
Tommy Tillman A+ NetWork+ MCP
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform