public static bool Undo() {
var handle = User32.FindWindowEx(
User32.FindWindowEx(User32.FindWindow("Progman", "Program Manager"), IntPtr.Zero, "SHELLDLL_DefView", ""),
IntPtr.Zero, "SysListView32", "FolderView");
if (handle != IntPtr.Zero) {
var current = User32.GetForegroundWindow();
User32.SetForegroundWindow(handle);
SendKeys.SendWait("^(z)");
User32.SetForegroundWindow(current);
return true;
} else {
return false;
}
}
#endregion