I created a simple WPF application for enable and disable the aero shake behavior. My code is like this:
using System.Windows;
using System.Runtime.InteropServices;
namespace TestDisableShaking
{
public partial class MainWindow : Window
{
const uint DWM_EC_DISABLECOMPOSITION = 0;
const uint DWM_EC_ENABLECOMPOSITION = 1;
[DllImport("dwmapi.dll", EntryPoint = "DwmEnableComposition")]
extern static uint DwmEnableComposition(uint compositionAction);
[DllImport("dwmapi.dll", EntryPoint = "DwmEnableComposition")]
protected static extern uint Win32DwmEnableComposition(uint uCompositionAction);
public MainWindow()
{
InitializeComponent();
DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
Win32DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);
}
}
}
Why my code does not function?
What this application do now: When I shake my window, the others windows are minimized.
What I want to do: When I shake my window, or I shake any window, no window should be minimized.
Windows 10 Disable Aero 1 Windows 10 Disable Shake to Minimize via Settings Open Settings. Select System. ... 2 Disable Aero Shake Windows 10 in Group Policy Open Windows Local Group Policy Editor. Go to User Configuration -> Administrative Templates -> Desktop. ... 3 Disable Aero Shake Windows 10 Using Registry Editor
The feature enables you to quickly minimize all open windows except the currently active window by shaking the currently active window or using Windows logo + Home keyboard shortcut. In earlier versions of Windows operating system, there was a dedicated option to enable or disable Aero Shake.
Windows 10 Disable Shake to Minimize via Settings 1 Open Settings. 2 Select System. 3 Shift to Multitasking. 4 Turn the corresponding option to Off.
Aero Peek Windows 10: putting your cursor over a taskbar thumbnail to preview the entire window. Aero Snap Windows 10: dragging a window to the right or left side of the desktop to fill it to the respective half of the screen.
Try this:
[DllImport("User32.dll")]
private static extern bool SystemParametersInfo(uint iAction, uint iParameter, ref uint pParameter, uint iWinIni);
[DllImport("User32.dll")]
private static extern bool SystemParametersInfo(uint iAction, uint iParameter, uint pParameter, uint iWinIni);
and
SystemParametersInfo(0x0083, (Convert.ToUInt32(0)), (Convert.ToUInt32(0)), Convert.ToUInt32(1));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With