Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
'LHA.DLL
Declare Function lha Lib "lha.dll" (ByVal szCmdLine As String, ByVal szOutPut As String, ByVal isize As Integer) As Integer
Declare Function LhaGetVersion Lib "lha.dll" () As Integer
Declare Function LhaSetCursorMode Lib "lha.dll" (ByVal curmode As Integer) As Integer
'Graphics
Declare Function BitBlt Lib "GDI" (ByVal hDestDC As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal nWidth As Integer, ByVal nHeight As Integer, ByVal hSrcDC As Integer, ByVal XSrc As Integer, ByVal YSrc As Integer, ByVal dwRop As Long) As Integer
Declare Function ReleaseDC Lib "User" (ByVal hWnd As Integer, ByVal hDC As Integer) As Integer
'Global constant definition
'HELP
Global Const HELP_CONTENTS = &H3 ' Display Help for a particular topic
Global Const HELP_QUIT = &H2 ' Terminate help
Global Const HELP_CONTEXT = &H1 ' Display topic in ulTopic
Global Const HELP_HELPONHELP = &H4 ' Display help on using help
Global Const HELP_SETCONTENTS = &H5 ' Display Help contents topic
Global Const HELP_CONTEXTPOPUP = &H8 ' Display Help topic in popup window
Global Const HELP_FORCEFILE = &H9 ' Ensure correct Help file is displayed
Global Const HELP_KEY = &H101 ' Display topic for keyword in offabData
Global Const HELP_COMMAND = &H102 ' Execute Help macro
Global Const HELP_PARTIALKEY = &H105 ' Display topic found in keyword list
Global Const HELP_MULTIKEY = &H201
Global Const HELP_SETWINPOS = &H203 ' Display and position Help window
'Graphics
Global Const MERGEPAINT = &HBB0226 ' (DWORD) dest = (NOT source) OR dest
Global Const PATCOPY = &HF00021 ' (DWORD) dest = pattern
Global Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
'Application
Global Const fMain = 0
Global Const fGet = 1
'Global variables
'Help
Global HelpFileName
'Application
Global buffer As String
Global cmd As String
Global szbuff As Integer
Global Filenum As Integer
'Type definitions
'Help
Type MULTIKEYHELP
mkSize As Integer
mkKeylist As String * 1
szKeyphrase As String * 253 ' Array length is arbitrary; may be changed
End Type
Sub procInsPath ()
Dim retcode As Integer
'Make sure that path ends with backslash
If Right$(frmGetFile.filFiles.Path, 1) <> "\" Then
Path = frmGetFile.filFiles.Path + "\"
Else
Path = frmGetFile.filFiles.Path
End If
'Extract the path and name of the selected file
If frmGetFile.txtFileName.Text = frmGetFile.filFiles.FileName Then
pathandname = Path + frmGetFile.filFiles.FileName
Else
retcode = InStr(frmGetFile.txtFileName.Text, "\")
If retcode = 0 Then 'If path not specified then add
pathandname = Path + frmGetFile.txtFileName
Else
pathandname = frmGetFile.txtFileName
End If
End If
'Set the frmgetfile.tag to selected file path and name