title: Disabling the hover behavior on winform buttons
body: <p>I'm developing a winform application using C# 4.0</p>
  
  <p>I have a form with one button. I changed the button's BackColor to yellow. At runtime, the button's back color changes slightly when I move the mouse over it. I want to disable this. I want the color to remain the same no matter what happens.</p>
  
  <p>Here's the form code:</p>
  
  <pre><code>using System;
  using System.Windows.Forms;
  
  namespace Something
  {
      public partial class Home : Form
      {
          public Home()
          {
              InitializeComponent();
          }
  
      }
  }
  
  
  
  namespace Something
  {
  partial class Home
  {
      /// &lt;summary&gt;
      /// Required designer variable.
      /// &lt;/summary&gt;
      private System.ComponentModel.IContainer components = null;
  
      /// &lt;summary&gt;
      /// Clean up any resources being used.
      /// &lt;/summary&gt;
      /// &lt;param name="disposing"&gt;true if managed resources should be disposed; otherwise, false.&lt;/param&gt;
      protected override void Dispose(bool disposing)
      {
          if (disposing &amp;&amp; (components != null))
          {
              components.Dispose();
          }
          base.Dispose(disposing);
      }
  
      #region Windows Form Designer generated code
  
      /// &lt;summary&gt;
      /// Required method for Designer support - do not modify
      /// the contents of this method with the code editor.
      /// &lt;/summary&gt;
      private void InitializeComponent()
      {
          System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Home));
          this.button1 = new System.Windows.Forms.Button();
          this.SuspendLayout();
          // 
          // button1
          // 
          this.button1.BackColor = System.Drawing.Color.Yellow;
          resources.ApplyResources(this.button1, "button1");
          this.button1.Name = "button1";
          this.button1.UseVisualStyleBackColor = false;
          // 
          // Home
          // 
          resources.ApplyResources(this, "$this");
          this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
          this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(226)))), ((int)(((byte)(227)))), ((int)(((byte)(228)))));
          this.Controls.Add(this.button1);
          this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
          this.Name = "Home";
          this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
          this.Load += new System.EventHandler(this.Home_Load);
          this.ResumeLayout(false);
  
      }
  
      #endregion
  
      private System.Windows.Forms.Button button1;
  
  
  
  }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>