title: Disable Windows Visual Effects through SystemParametersInfo
body: <p>I am trying to disable all visual effects programmatically in a Windows Forms App. Other than an extense list of registry values to be changed, i found this option, but I cant seem to get it to work.</p>
  
  <p>Searched in pinvoke.net and on MSDN for a more specific answer, but I could not find one.</p>
  
  <p>So, heres the data I have:</p>
  
  <p>Info about SPI_SETUIEFFECTS</p>
  
  <blockquote>
    <p>SPI_SETUIEFFECTS
    0x103F</p>
    
    <p>Enables or disables UI effects. Set the pvParam parameter to TRUE to enable all UI effects or FALSE to disable all UI effects.</p>
  </blockquote>
  
  <p>I need to pass it a bool as the pvParam, which seems to be an exception to the general rule... ok, then I try declaring it as:</p>
  
  <pre><code>[DllImport("user32.dll", SetLastError = true)]
  [return: MarshalAs(UnmanagedType.Bool)]
  static extern bool SystemParametersInfo(uint uiAction, uint uiParam, bool pvParam, uint fWinIni);
  </code></pre>
  
  <p>now, to call it:</p>
  
  <pre><code>const uint SPI_SETUIEFFECTS = 0x103F;
  const uint SPIF_SENDCHANGE = 0x02;
  
  bool result = SystemParametersInfo(SPI_SETUIEFFECTS, 0, false, SPIF_SENDCHANGE);
  </code></pre>
  
  <p>And it builds, runs... and does nothing. No error, no change. "result" is set to true.</p>
  
  <p>What am I missing here?</p>