title: Add a UAC shield to a button and retain its background image?
body: <p>Using C# and .Net 4.0 in a winforms application: Is it possible to add the UAC shield to a button and retain the buttons background image? How?</p>
  
  <p>This is what I'm using at the moment, but it removes the image...</p>
  
  <pre><code>[DllImport("user32.dll")]
  public static extern int SendMessage(IntPtr hWnd, uint Msg, int wParam, int lParam);
  
  public static void UACToButton(Button button, bool add)
  {
      const Int32 BCM_SETSHIELD = 0x160C;
      if (add)
          {
          // The button must have the flat style
          button.FlatStyle = FlatStyle.System;
          if (button.Text == "")
          // and it must have text to display the shield
              button.Text = " ";
              SendMessage(button.Handle, BCM_SETSHIELD, 0, 1);        
          }
          else
              SendMessage(button.Handle, BCM_SETSHIELD, 0, 0);    
  }
  </code></pre>
  
  <p>Thanks!</p>