dynamic shell = System.Runtime.InteropServices.Marshal.GetActiveObject("Shell.Application"); dynamic windows = shell.Windows(); for (int i = 0; i < windows.Count; i++) windows.Item(i).Refresh();