home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD35682232000.psc / SHFInfo.Bas < prev   
Encoding:
BASIC Source File  |  2000-02-21  |  5.3 KB  |  107 lines

  1. Attribute VB_Name = "ModSHFileInfo"
  2. Option Explicit
  3.  
  4. Declare Function DrawIcon Lib "user32" (ByVal hdc As Long, _
  5.                                                            ByVal x As Long, _
  6.                                                            ByVal y As Long, _
  7.                                                            ByVal hIcon As Long) As Boolean
  8.  
  9. Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, _
  10.                                                               ByVal xLeft As Long, _
  11.                                                               ByVal yTop As Long, _
  12.                                                               ByVal hIcon As Long, _
  13.                                                               ByVal cxWidth As Long, _
  14.                                                               ByVal cyWidth As Long, _
  15.                                                               ByVal istepIfAniCur As Long, _
  16.                                                               ByVal hbrFlickerFreeDraw As Long, _
  17.                                                               ByVal diFlags As Long) As Boolean
  18. ' DrawIconEx() diFlags values:
  19. Public Const DI_MASK = &H1
  20. Public Const DI_IMAGE = &H2
  21. Public Const DI_NORMAL = &H3
  22. Public Const DI_COMPAT = &H4
  23. Public Const DI_DEFAULTSIZE = &H8
  24.  
  25.  
  26.  
  27. ' pszPath:
  28. ' Pointer to a buffer that contains the path and filename. Both absolute and
  29. ' relative paths are valid. If uFlags includes the SHGFI_PIDL, value pszPath
  30. ' must be the address of an ITEMIDLIST structure that contains the list of
  31. ' item identifiers that uniquely identifies the file within the shell's name space.
  32. ' This string can use either short (the 8.3 form) or long filenames.
  33.  
  34. ' dwFileAttributes:
  35. ' Array of file attribute flags (FILE_ATTRIBUTE_ values). If uFlags does not
  36. ' include the SHGFI_USEFILEATTRIBUTES value, this parameter is ignored.
  37.  
  38. Public Const FILE_ATTRIBUTE_READONLY = &H1
  39. Public Const FILE_ATTRIBUTE_HIDDEN = &H2
  40. Public Const FILE_ATTRIBUTE_SYSTEM = &H4
  41. Public Const FILE_ATTRIBUTE_DIRECTORY = &H10
  42. Public Const FILE_ATTRIBUTE_ARCHIVE = &H20
  43. Public Const FILE_ATTRIBUTE_NORMAL = &H80
  44. Public Const FILE_ATTRIBUTE_TEMPORARY = &H100
  45. Public Const FILE_ATTRIBUTE_COMPRESSED = &H800
  46.  
  47. ' uFlags:
  48. ' Flag that specifies the file information to retrieve. This parameter can
  49. ' be a combination of the following values:
  50.  
  51. ' Modifies SHGFI_ICON, causing the function to retrieve the file's open icon.
  52. ' A container object displays an open icon to indicate that the container is open.
  53. Public Const SHGFI_OPENICON = &H2&
  54.  
  55. ' Modifies SHGFI_ICON, causing the function to retrieve a shell-sized icon.
  56. ' If this flag is not specified, the function sizes the icon according to the system metric values.
  57. Public Const SHGFI_SHELLICONSIZE = &H4&
  58.  
  59. ' Indicates that pszPath is the address of an ITEMIDLIST structure rather than a path name.
  60. Public Const SHGFI_PIDL = &H8&
  61.  
  62. ' Indicates that the function should use the dwFileAttributes parameter.
  63. Public Const SHGFI_USEFILEATTRIBUTES = &H10&
  64.  
  65. ' Retrieves the handle of the icon that represents the file and the index of the
  66. ' icon within the system image list. The handle is copied to the hIcon member
  67. ' of the structure specified by psfi, and the index is copied to the iIcon member.
  68. ' The return value is the handle of the system image list.
  69. Public Const SHGFI_ICON = &H100&
  70.  
  71. ' Retrieves the display name for the file. The name is copied to the szDisplayName
  72. ' member of the structure specified by psfi. The returned display name uses the
  73. ' long filename, if any, rather than the 8.3 form of the filename.
  74. Public Const SHGFI_DISPLAYNAME = &H200&
  75.  
  76. ' Retrieves the string that describes the file's type. The string is copied to the
  77. ' szTypeName member of the structure specified by psfi.
  78. Public Const SHGFI_TYPENAME = &H400&
  79.  
  80. ' Retrieves the file attribute flags. The flags are copied to the dwAttributes
  81. ' member of the structure specified by psfi.
  82. Public Const SHGFI_ATTRIBUTES = &H800&
  83.  
  84. ' Retrieves the name of the file that contains the icon representing the file.
  85. ' The name is copied to the szDisplayName member of the structure specified by psfi.
  86. Public Const SHGFI_ICONLOCATION = &H1000&
  87.  
  88. ' Returns the type of the executable file if pszPath identifies an executable file.
  89. ' To retrieve the executable file type, uFlags must specify only SHGFI_EXETYPE.
  90. ' The return value specifies the type of the executable file:
  91. ' 0                                                                       Nonexecutable file or an error condition.
  92. ' LOWORD = NE or PEHIWORD = 3.0, 3.5, or 4.0  Windows application
  93. ' LOWORD = MZHIWORD = 0                               MS-DOS .EXE, .COM or .BAT file
  94. ' LOWORD = PEHIWORD = 0                               Win32 console application
  95. Public Const SHGFI_EXETYPE = &H2000&
  96.  
  97. ' Retrieves the index of the icon within the system image list. The index is copied to the iIcon
  98. ' member of the structure specified by psfi. The return value is the handle of the system image list.
  99. Public Const SHGFI_SYSICONINDEX = &H4000&
  100.  
  101. ' Modifies SHGFI_ICON, causing the function to add the link overlay to the file's icon.
  102. Public Const SHGFI_LINKOVERLAY = &H8000&
  103.  
  104. ' Modifies SHGFI_ICON, causing the function to blend the file's icon with the system highlight color.
  105. Public Const SHGFI_SELECTED = &H10000
  106.  
  107.