Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help! VFP Run command Window Locks
Message
De
05/01/1999 08:45:41
Scott Knight
Human Resources Development Canada
St. John's, Terre-Neuve, Canada
 
 
À
05/01/1999 08:11:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00172692
Message ID:
00172708
Vues:
31
>>I am tearing my hair out over this one. I have a VFP program which is required to DOS Pkzip files. I have always used this same approach with 95 and I thought NT in the past without a problem. The following is the partial sample code extract :
>>
>>select offices
>>SCAN
>> * O.k When run here
>> *testcmd = "p:\support\pkzip.exe"
>> *run &testcmd
>>
>> wait window "Testing office : " + offices.office
>> Coffice = offices.office
>>
>> * O.k when run Here
>> *testcmd = "p:\support\pkzip.exe"
>> *run &testcmd
>>
>>****************************************************
>> if offices.prodnld = .T.
>> * Not O.k Here
>> testcmd = "p:\support\pkzip.exe"
>> run &testcmd
>>****************************************************
>> wait window "Starting office : " + offices.office
>> Cpath = Ccurpath + Coffice + "\dnld\"
>>
>>It seems when the code enters the first if statement it is game over. Th DOS zipping completes properly however the run command window will not exit. I changed the foxrun.pif not to close on exit and it would then allow me to manually click close however right after clicking close VFP Locks Solid with the run command window still on the screen with the mouse as an hour glass. Any help or direction would be much appreciated.
>
>Rather than using the RUN command, try using the API call CreateProcess() or ShellExecuteEx() to run the PKZIP command. Take a look in the FAQ under Classes - VCX for the Executable launch management class, which uses CreateProcess().

Hi Ed,
That looks like the solution to my problem. However when I cut and pasted the code from the KB all the formatting was lost thus creating many syntax errors. Is it possible to download the files directly from this site or for you to e-mail them to me.

P.S. I would take the time to fix them normally except I was susposed to have data split/zipped/sent for 100 offices by yesterday and I have had nothing but bad luck.

Thanks



Scott K
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform