public static void FileOperation(FileOpActions action, IntPtr hwndExplr, IShellBrowser shellBrowser) { IntPtr hwnd = FileOps.fVista ? FindWindowEx(hwndExplr, IntPtr.Zero, new StringBuilder("ShellTabWindowClass"), null) : hwndExplr; if(FileOps.fVista) SendMessage(hwnd, WM_COMMAND, (IntPtr)action, IntPtr.Zero); else PostMessage(hwnd, WM_COMMAND, (IntPtr)action, IntPtr.Zero); // make selected icons transparent and refresh them immediately. // ( when NO-FULLROW-SELECT setting is ON, vista's explorer won't redraw items... ) if(FileOps.fVista && action == FileOpActions.Cut && shellBrowser != null) FileOps.RefreshItems(shellBrowser); }
public static void FileOperation(FileOpActions action, IntPtr hwndExplr, IShellBrowser shellBrowser) { IntPtr hwnd = FileOps.fVista ? FindWindowEx(hwndExplr, IntPtr.Zero, new StringBuilder("ShellTabWindowClass"), null) : hwndExplr; if (FileOps.fVista) { SendMessage(hwnd, WM_COMMAND, (IntPtr)action, IntPtr.Zero); } else { PostMessage(hwnd, WM_COMMAND, (IntPtr)action, IntPtr.Zero); } // make selected icons transparent and refresh them immediately. // ( when NO-FULLROW-SELECT setting is ON, vista's explorer won't redraw items... ) if (FileOps.fVista && action == FileOpActions.Cut && shellBrowser != null) { FileOps.RefreshItems(shellBrowser); } }