*!*
pictemp=Thisform.image1.Picture
*!*
j=0
*!*
Do While .T.
*!*
j=j+1
*!*
If Left(Right(pictemp,j),1)=="\"
*!*
Exit
*!*
Endif
*!*
Enddo
*!*
fielname="photo" + Right(pictemp,j)
以上代码会遇到死循环.可用以下这句代替
fielname=IIF(EMPTY(Thisform.image1.Picture),'',"photo\" + Justfname(Thisform.image1.Picture))
---------------------------
在 "粘贴照片",同样有这问题,可能这样修改。
pictemp=getpict("bmp;jpg","选择照片","导入")
if EMPTY(pictemp)
return
endif
fielname='photo\'+Justfname(pictemp)
COPY FILE (pictemp) TO (fielname)
thisform.image1.picture=fielname
[
本帖最后由 kiff 于 2013-5-15 16:21 编辑 ]