View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
Hi Sam,
wrong forum for that question but hey, there is a simple solution. Just use the "old" RUN command which will do exactly what you want.
 
Cas
Sent by Sam Sengsavang on 03/13/2003 10:05:39 AM:
Hello all,
 I developed my application in Visual FoxPro 6.0.  I want it to use shellexecute to run "winzip32.exe" and wait until "winzip32.exe" finishes its job before the application continue processing.  Here's my code...
 
Function Unzip
PARAMETERS m.FILENAME,m.DESTDIR
LOCAL LNRETVAL, LCOPERATION
LCOPERATION = "Open"
   DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
        INTEGER handle,;
        STRING @sFile,;
        STRING @lp,;
        STRING @DIR,;
        STRING @dir1,;
        INTEGER ncmd
    LNRETVAL = SHELLEXECUTE(0, LCOPERATION, "Winzip",;
        " -e "+m.FILENAME+" "+m.DESTDIR, "", 1)
 RETURN .F.
 
This code is working but my FoxPro App. doesn't stop and wait for WinZip to finish its job.
 
Please help,
 
Sam