private void OnOpen(object sender, EventArgs eventArgs) { SHELLEXECUTEINFO sei = new SHELLEXECUTEINFO(); sei.cbSize = Marshal.SizeOf(sei); sei.fMask = SEE.SEE_MASK_IDLIST | SEE.SEE_MASK_CLASSNAME; var fullPidl = PidlManager.IdListToPidl(PidlManager.Combine(_folderIdList, _folderItemIdLists[0])); sei.lpIDList = fullPidl; sei.lpClass = "folder"; sei.hwnd = CurrentInvokeCommandInfo.WindowHandle; sei.nShow = CurrentInvokeCommandInfo.ShowCommand; sei.lpVerb = "open"; // todo parameter open. Shell32.ShellExecuteEx(ref sei); PidlManager.DeletePidl(fullPidl); }
private void toolStripButtonShowProperties_Click(object sender, EventArgs e) { var path = shellListView.GetShellItem(shellListView.SelectedItems[0]).Path; const int SW_SHOW = 5; var shell_ex = new SHELLEXECUTEINFO { cbSize = Marshal.SizeOf(new SHELLEXECUTEINFO()), lpFile = path, nShow = SW_SHOW, fMask = SEE.SEE_MASK_INVOKEIDLIST, lpVerb = "Properties" }; Shell32.ShellExecuteEx(ref shell_ex); }
public static extern int ShellExecuteEx(ref SHELLEXECUTEINFO pExecInfo);