Embedding a File Explorer instance in a Windows Forms application form

前端 未结 8 1364
心在旅途
心在旅途 2020-12-01 02:04

My (C#, .NET 3.5) application generates files and, in addition to raising events that can be caught and reacted to, I want to display the target folder to the user in a form

相关标签:
8条回答
  • 2020-12-01 02:28

    If you are happy being Windows Vista only and wrapping a COM control, IExplorerBrowser might be acceptable for you needs.

    This The Code Project article shows its use within an MFC program but at least one other person seems to have got it to work in C# after some effort.

    The newer API exposes considerably more programmability than simply intercepting messages, but it is (obviously) useless for older platforms.

    0 讨论(0)
  • 2020-12-01 02:31

    I have written a library that might be able to help you. You can find it at: http://gong-shell.sourceforge.net/

    The control you're looking for is the ShellView. There's tutorials there on how to create a simple Windows Explorer clone in only a few lines too.

    Note for .NET 4.0 users: Gong-shell is currently broken for 4.0. The framework introduced changes in Interop and it will build just fine but cause different issues when interfacing with shell32 (notably the shellicon api, leading to an unmanaged null pointer dereference).

    0 讨论(0)
提交回复
热议问题