Take a look at this example to get a mouse click or selected events:
https://stackoverflow.com/questions/7222749/i-created-a-program-to-hide-desktop-icons-on-double-click-of-desktop-but-would-o
Join this with the following code. Do not forget to add a link to SHDocVW.dll and Shell32.dll, this will return all selected paths of elements and folders in each explorer.
public void GetListOfSelectedFilesAndFolderOfWindowsExplorer() { string filename; ArrayList selected = new ArrayList(); var shell = new Shell32.Shell(); //For each explorer foreach (SHDocVw.InternetExplorer window in new SHDocVw.ShellWindowsClass()) { filename = Path.GetFileNameWithoutExtension(window.FullName).ToLower(); if (filename.ToLowerInvariant() == "explorer") { Shell32.FolderItems items = ((Shell32.IShellFolderViewDual2)window.Document).SelectedItems(); foreach (Shell32.FolderItem item in items) { MessageBox.Show(item.Path.ToString()); selected.Add(item.Path); } } } }
source share