画像は私が現在使っているX-Finderというファイラーです。(X-Finderについて詳しくは公式サイトをご覧ください) 大変高機能でカスタマイズを仕切れていませんが、そのメニューに「エクスプローラの取り込み」や「他のウインドウのパス」といった項目が存在します。 その名の通り、エクスプローラで開いているパスを取得することができます。 それをC#でやってみます。 今回はdynamicやDllImportは使わずにやります。 参照の追加と用意 まずはテスト用のプロジェクトを作ります。 普通にフォームアプリケーションにしてください。 続いて、エクスプローラを操作するのに必要な参照の追加を行います。 エクスプローラはWindowsからInternet Explorerと同じ扱いを受けています。 そのためCOMを利用してアクセスすることができます。 「参照の追加」の「COM」タブから ・Micro