when I save an Image the url is
"C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"
I wish save as " ..\images\due_lettini_regista.png"
how I can resolve ?
Function test()
Local cPathMask:="C:\WORK\PRG\WINBEACH\images\due_lettini_regista.png"
? RelativePath( cPathMask ) + UrlImage(cPathMask)
return nil
Function UrlImage(curlImg)
Local aTmp
local nLevel := 1
local x
local cCad :=""
aTmp := Hb_ATokens( curlImg, "\" )
For x = Len( aTmp ) - nLevel + 1 To Len( aTmp )
cCad += AllTrim( aTmp[ x ] )
if x < Len( aTmp )
cCad += "\"
endif
Next x
return cCad
Function RelativePath( cFile )
local cPath, cRelPath, cTemp
cPath:= cFilePath(cFile)
cTemp:= left(cPath,len(cPath)-1)
cRelPath:= "." + right(cPath, len(cPath) + 1 - rat("\",cTemp) )
return cRelPath
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 41 guests