title: Edit the background of a button in c#
body: <p>I have a little problem of mine to solve. I have a button which has an image background.I tried to color the whole button but the image can not be seen after coloring the whole button. How can I edit this "imagebutton" like in this example? <a href="http://i.stack.imgur.com/XaQQQ.png" rel="nofollow">http://i.stack.imgur.com/XaQQQ.png</a></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace bura
  {
      public partial class Form1 : Form
      {
  
  
          public Form1()
          {
              InitializeComponent(); 
          }
          private void button2_Click(object sender, EventArgs e)
          {
              if (button2.BackgroundImage != null)
              {
                  button2.BackgroundImage = null;
                  button2.BackColor = Color.Black; 
              }
  
              else {
                  button2.BackgroundImageLayout = ImageLayout.Stretch; 
                  button2.BackgroundImage = Image.FromFile("C:\\Users\\rati\\Desktop\\ks.png");
              }
  
          }
  
          private void button3_Click(object sender, EventArgs e)
          {
              button2.BackgroundImageLayout = ImageLayout.Stretch;
              button2.BackgroundImage = Image.FromFile("C:\\Users\\rati\\Desktop\\ks.png");
          }
      }
  }
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/XaQQQ.png" rel="nofollow">This</a></p>