| Yes, it does show that data about videos. But I couldn't figure out
| how to get to that information programmatically.
|
The property pages are separate. I don't know
offhand what property page you're talking about
and don't have a running copy of Win7 handy, but
maybe the library getting that data is available?)
Either way, the Shell object
I'm talking about returns the info. that shows in
Details view. (In Win9x that's about 5 things. In Win7
you can choose from dozens of data bits.)
Shell is a bit clunky, but it works. It's essentially the
function set that Explorer has been using in the GUI since
Active Desktop. You can access any file or folder as
an item as Explorer sees it. You can also trap selection
events if necessary. (I've done that for an Explorer Bar,
so that the bar can update based on changing folder
item selection.)
The following is a sample of getting file properties. Set
a reference to "Microsoft Shell Controls and Automation".
(Note: There are some parts of Shell that require variants.
I don't remember what offhand. But if you run into any
sort of inexplicable errors at any point, switch to variant
datatypes and Dispatch "as Object" declarations.)
Private Sub Command1_Click()
Dim SH As Shell
Dim SHFol As Folder2
Dim FolItem As FolderItem, FolItems As FolderItems
Dim sFilePath As String, sFile As String, sFol As String
Dim Pt1 As Long, i2 As Long, i3 As Long
sFilePath =
"C:\windows\desktop\Bill_Gates_on_Windows_8_Windows_Phone_8_and_Microsoft_Surface.flv"
Pt1 = InStrRev(sFilePath, "\")
sFol = Left$(sFilePath, Pt1 - 1)
If Len(sFol) = 2 Then sFol = sFol & "\"
sFile = Right$(sFilePath, Len(sFilePath) - Pt1)
Set SH = New Shell
Set SHFol = SH.NameSpace(CVar(sFol))
Set FolItems = SHFol.Items
For i2 = 1 To FolItems.Count
If FolItems.Item(i2).Name = sFile Then
For i3 = -1 To 50
Debug.Print CStr(i3) & " - " &
SHFol.GetDetailsOf(FolItems.Item(i2), i3)
Next
Exit For
End If
Next
Set FolItems = Nothing
Set SHFol = Nothing
Set SH = Nothing
End Sub
Funny side note: The sample file used here is a weird
video of Bill Gates gushing disjointedly for 5 minutes about
how [insert any old superlative here] Windows Tile
Mania is. The video is on technet but it's hosted on
Youtube! ...Somehow that seems deeply inauspicious
to me.