$PBExportHeader$f_ljnc_get_path.srf global type f_ljnc_get_path from function_object end type forward prototypes global function string f_ljnc_get_path () end prototypes global function string f_ljnc_get_path ();String ls_Path, ls_Buffer = Space(255) If Handle(GetApplication(), False) = 0 Then //开发模式运行 ls_Path = GetCurrentDirectory() Else //编译后运行 If GetModuleFileName(Handle(GetApplication()),ls_Buffer,255) = 0 Then SetNull(ls_Buffer) ls_Path = '' Else ls_Buffer = Left(ls_Buffer,LastPos(ls_Buffer,"\")) ls_Path = Trim( ls_Buffer ) End If End If If ls_path <> '' And Right(ls_path, 1) <> '\' Then ls_path += '\' Return ls_Path end function