Open a Windows 7 Library in Windows Explorer

前端 未结 6 1008
星月不相逢
星月不相逢 2020-12-21 02:10

How do I open a Windows 7 Library like Documents, Pictures, Music, Videos and all other custom libraries from my app?

6条回答
  •  执笔经年
    2020-12-21 02:32

    Look at this to see how the most common actions are performed on Windows 7 libraries.

    Edit:

    The sample uses the Windows API Code Pack for Micorosoft .Net Framework [ edit 2015-09-24: previous link is dead - use this SO entry to locate the necessary Nuget packages ] (thanks MarkJ for pointing out that the link should be there).

    As for David Heffernan's question ...

    You use the assign the ShellLibrary object to the DefaultDirectoryShellContainer property of an Microsoft.WindowsAPICodePack.Dialogs.CommonFileDialog (e.g. the Microsoft.WindowsAPICodePack.Dialogs.CommonOpenFileDialog).

提交回复
热议问题