0

みんなおはよう、

Excel アドインとして配布されるプロジェクトがあります。これは C# で記述され、ExcelDNA を使用しています。

私がやりたいことは、アドインのメイン フォームに linklabel を追加することです。クリックすると、G: ドライブなどの特定のインデックスで Windows エクスプローラーが開きます。

これは可能ですか?私はいくつかの例を見てきましたが、それらを論争させることができませんでした.

前もって感謝します!

4

1 に答える 1

1

絶対:

Microsoft KBから:

   Option            Function
   ----------------------------------------------------------------------   
   /n                Opens a new single-pane window for the default
                     selection. This is usually the root of the drive that
                     Windows is installed on. If the window is already
                     open, a duplicate opens.

   /e                Opens Windows Explorer in its default view.

   /root,<object>    Opens a window view of the specified object.

   /select,<object>  Opens a window view with the specified folder, file,
                     or program selected.

   Examples
   -----------------------------------------------------------------------
   Example 1: Explorer /select,C:\TestDir\TestProg.exe
              Opens a window view with TestProg selected.

   Example 2: Explorer /e,/root,C:\TestDir\TestProg.exe
              Opens Explorer with drive C expanded and TestProg selected.

   Example 3: Explorer /root,\\TestSvr\TestShare
              Opens a window view of the specified share.

   Example 4: Explorer /root,\\TestSvr\TestShare,select,TestProg.exe
              Opens a window view of the specified share with TestProg selected.

Explorer /select,G:\yourfileそのため、そのファイル/ディレクトリを選択してエクスプローラーを開くように呼び出すことができます。

その電話を入れてくださいProcess.Start():)

于 2011-11-09T09:28:13.913 に答える