Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code need fix
Message
De
03/06/2009 05:15:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Code need fix
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01403350
Message ID:
01403350
Vues:
131
hi all,

i need help to fix this code below


SET DEFAULT TO "\\istweb-devlop\error\arttachment"

DIMENSION laFiles(8)
laFiles[1] = "pdf"
laFiles[2] = "tif"
laFiles[3] = "jpg"
laFiles[4] = "gif"
laFiles[5] = "bmp"
laFiles[6] = "doc"
laFiles[7] = "docx"
laFiles[8] = "rar"
FOR x = 1 TO ALEN(laFiles)
m.lcFileName = allTRIM(thisform.text5.value)+"a" + "." + laFiles(x)
thisform.text8.Value=allTRIM(thisform.text5.value)+"a" + "." + laFiles(x)&& it works
*************************************************************************************
LOCATE FOR m.lcFileName = allTRIM(thisform.text5.value)+"b" + "." + laFiles(x)&¬ work
IF FOUND()
thisform.text9.Value=allTRIM(thisform.text5.value)+"b" + "." + laFiles(x)
endif

LOCATE FOR m.lcFileName = allTRIM(thisform.text5.value)+"c" + "." + laFiles(x)&¬ work
IF FOUND()
thisform.text10.Value=allTRIM(thisform.text5.value)+"c" + "." + laFiles(x)
endif

LOCATE FOR m.lcFileName = allTRIM(thisform.text5.value)+"d" + "." + laFiles(x)&¬ work
IF FOUND()
thisform.text11.Value=allTRIM(thisform.text5.value)+"d" + "." + laFiles(x)
endif



******************************************************************************************
IF FILE(m.lcFileName)
EXIT
ENDIF
ENDFOR



If File(m.lcFileName)

Declare Long ShellExecute In "shell32.dll" ;
long HWnd, String lpszOp, ;
string lpszFile, String lpszParams, ;
string lpszDir, Long nShowCmd

lnResult = ShellExecute(0,'Open', m.lcFileName, 0,0,1)
IF !(m.lnResult > 32)
endif
Else

MESSAGEBOX("not found")
ENDIF



thanks
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform