DBPix Sample Source Code: PathUtils Back to sample
Option Compare Database
Option Explicit
' Set BASE_PATH to the common root folder of the photo archive.
' Paths will be stored relative to this root location.
'
' Examples:
'
' UNC Path:
' Public Const BASE_PATH As String = "\\Server\Share\Folder\"
'
' Local Path or mapped share:
' Public Const BASE_PATH As String = "F:\Archive\Photos\"
'
' Allow any location, i.e. store an absolute path
' (not recommended - use relative paths wherever possible):
' Public Const BASE_PATH As String = ""
Public Const BASE_PATH As String = "C:\"
Public Function ChooseFile() As String
Dim strFilter As String
strFilter = ahtAddFilterItem(strFilter, "JPEG Files (*.jpg, *.jpeg)", "*.jpg;*.jpeg")
ChooseFile = ahtCommonFileOpenSave( _
InitialDir:=BASE_PATH, _
Filter:=strFilter, _
OpenFile:=True, _
DialogTitle:="Select Photo...", _
Flags:=ahtOFN_FILEMUSTEXIST)
End Function
Back to sample
|