home *** CD-ROM | disk | FTP | other *** search
/ ftp.alaska-software.com / 2014.06.ftp.alaska-software.com.tar / ftp.alaska-software.com / acsn / RTF100.ZIP / Addon.prg next >
Text File  |  1999-12-15  |  833b  |  41 lines

  1. * -----------------------------
  2. * AddOn.prg
  3. * -----------------------------
  4.  
  5. FUNCTION PC_GetSaveFile( cFile, lKeepPath )
  6. LOCAL cCurDrive, cCurDir, oFileDlg
  7.  
  8.    IF valtype( lKeepPath ) <> "L"
  9.       lKeepPath := .T.
  10.    ENDIF
  11.  
  12.    cCurDrive := CurDrive()
  13.    cCurDir   := CurDir( cCurDrive + ":" )
  14.    oFileDlg := XbpFileDialog():New()
  15.    oFileDlg:Create( AppDeskTop() )
  16.    cFile := oFileDlg:SaveAs( cFile )
  17.    oFileDlg:Destroy()
  18.  
  19.    IF lKeepPath
  20.       CurDir( cCurDrive + ":\" + cCurDir )
  21.    ENDIF
  22.  
  23. RETURN (cFile)
  24.  
  25. FUNCTION PC_DotFile( cName, nSize )
  26. LOCAL nLength
  27.  
  28.    IF valtype( nSize ) <> "N"
  29.       nSize := 25
  30.    ENDIF
  31.    IF nSize < 10
  32.       nSize := 10
  33.    ENDIF
  34.  
  35.    nLength := len( cName )
  36.    IF nLength > nSize
  37.       cName := "..." + substr( cName, nLength - 17 )
  38.    ENDIF
  39.  
  40. RETURN ( cName ) 
  41.