Page 1 of 1

Show Properties-Window for multiple files/folders?

Posted: Sun Mar 20, 2011 6:02 pm
by nco2k
hi folks,

im using the following code to display the properties-window for a file/folder:

Code: Select all

Procedure ShowFileProperties(FileName$)
  Protected Result, CoInit, shell.SHELLEXECUTEINFO\cbSize = SizeOf(SHELLEXECUTEINFO)
  CoInit = CoInitializeEx_(0, #COINIT_APARTMENTTHREADED | #COINIT_DISABLE_OLE1DDE)
  If CoInit = CoInit & 1
    shell\fMask = #SEE_MASK_INVOKEIDLIST
    shell\lpVerb = @"properties"
    shell\lpFile = @FileName$
    shell\nShow = #SW_SHOW
    If ShellExecuteEx_(@shell)
      Result = #True
    EndIf
    CoUninitialize_()
  EndIf
  ProcedureReturn Result
EndProcedure
ShowFileProperties("C:\test.txt")
Delay(3000)
it works great but did anyone ever managed to make it work for multiple files/folders? :?

c ya,
nco2k

Re: Show Properties-Window for multiple files/folders?

Posted: Tue Mar 22, 2011 2:01 pm
by spikey
I don't think you can that way. ShellExecuteEx uses the verb table to determine what action should be performed. A collection of files doesn't work in an identical way. However Shell32.dll contains SHMultiFileProperties - have a look at http://msdn.microsoft.com/en-us/library ... s.85).aspx

Re: Show Properties-Window for multiple files/folders?

Posted: Fri Mar 25, 2011 10:15 am
by nco2k
hi and thanks for your reply. i didnt even know that such a function existed. :o

now only thing left is to find out how to make it work in pb.. looks kinda complicated. :?

c ya,
nco2k