Function Main As String
' Show program file & path

' THE EXAMPLE ILLUSTRATES THE USE OF:
'   JustFileName
'   JustFilePath
'   GetProgPathName

Dim s0,s As String, i,k As Integer
Const title="SHOW PROGRAM FILE ANF PATH"

  k=MBB_OK + MBI_INFORMATION

  'Use GetProgPathName
  s=GetProgPathName
  s0=s
  i=MessageBox("Full path = "+Chr(13)+Chr(13)+"'"+s+"'", title, k)
  'Use JustFileName
  s=JustFileName(s0)
  i=MessageBox("Name = "+Chr(13)+Chr(13)+"'"+s+"'", title, k)
  'Use JustPathName
  s=JustPathName(s0)
  i=MessageBox("Path = "+Chr(13)+Chr(13)+"'"+s+"'", title, k)

  Main="Demo completed"
End Function
