home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / graphics / bitlin / main.bas < prev    next >
Encoding:
BASIC Source File  |  1995-05-23  |  2.9 KB  |  80 lines

  1. 'Function declaration
  2.  'Help
  3. Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
  4.  'LHA.DLL
  5. Declare Function lha Lib "lha.dll" (ByVal szCmdLine As String, ByVal szOutPut As String, ByVal isize As Integer) As Integer
  6. Declare Function LhaGetVersion Lib "lha.dll" () As Integer
  7. Declare Function LhaSetCursorMode Lib "lha.dll" (ByVal curmode As Integer) As Integer
  8.  'Graphics
  9. 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
  10. Declare Function ReleaseDC Lib "User" (ByVal hWnd As Integer, ByVal hDC As Integer) As Integer
  11.  
  12. 'Global constant definition
  13.  'HELP
  14. Global Const HELP_CONTENTS = &H3     ' Display Help for a particular topic
  15. Global Const HELP_QUIT = &H2    '  Terminate help
  16. Global Const HELP_CONTEXT = &H1 '  Display topic in ulTopic
  17. Global Const HELP_HELPONHELP = &H4  '  Display help on using help
  18. Global Const HELP_SETCONTENTS = &H5  ' Display Help contents topic
  19. Global Const HELP_CONTEXTPOPUP = &H8 ' Display Help topic in popup window
  20. Global Const HELP_FORCEFILE = &H9    ' Ensure correct Help file is displayed
  21. Global Const HELP_KEY = &H101 ' Display topic for keyword in offabData
  22. Global Const HELP_COMMAND = &H102    ' Execute Help macro
  23. Global Const HELP_PARTIALKEY = &H105 ' Display topic found in keyword list
  24. Global Const HELP_MULTIKEY = &H201
  25. Global Const HELP_SETWINPOS = &H203  ' Display and position Help window
  26.  'Graphics
  27. Global Const MERGEPAINT = &HBB0226 ' (DWORD) dest = (NOT source) OR dest
  28. Global Const PATCOPY = &HF00021 ' (DWORD) dest = pattern
  29. Global Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
  30.  'Application
  31. Global Const fMain = 0
  32. Global Const fGet = 1
  33.  
  34. 'Global variables
  35.  'Help
  36. Global HelpFileName
  37.  'Application
  38. Global buffer As String
  39. Global cmd As String
  40. Global szbuff As Integer
  41. Global Filenum As Integer
  42.  
  43.  
  44. 'Type definitions
  45.  'Help
  46. Type MULTIKEYHELP
  47.     mkSize As Integer
  48.     mkKeylist As String * 1
  49.     szKeyphrase As String * 253 ' Array length is arbitrary; may be changed
  50. End Type
  51.  
  52. Sub procInsPath ()
  53.  
  54. Dim retcode As Integer
  55.  
  56. 'Make sure that path ends with backslash
  57. If Right$(frmGetFile.filFiles.Path, 1) <> "\" Then
  58.   Path = frmGetFile.filFiles.Path + "\"
  59. Else
  60.   Path = frmGetFile.filFiles.Path
  61. End If
  62.  
  63. 'Extract the path and name of the selected file
  64. If frmGetFile.txtFileName.Text = frmGetFile.filFiles.FileName Then
  65.   pathandname = Path + frmGetFile.filFiles.FileName
  66. Else
  67.   retcode = InStr(frmGetFile.txtFileName.Text, "\")
  68.   If retcode = 0 Then       'If path not specified then add
  69.    pathandname = Path + frmGetFile.txtFileName
  70.   Else
  71.    pathandname = frmGetFile.txtFileName
  72.   End If
  73. End If
  74.  
  75. 'Set the frmgetfile.tag to selected file path and name
  76. frmGetFile.Tag = pathandname
  77.  
  78. End Sub
  79.  
  80.