title: How do i create a pictureBox user control?
body: <p>This is what i did in the User Control code:
  I added a User Control to my project.</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Drawing;
  using System.Data;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using System.Drawing.Drawing2D;
  
  namespace Find_Distance
  {
      public partial class pictureBox1Control : UserControl
      {
          public pictureBox1Control()
          {
              InitializeComponent();
  
              SetStyle(
              ControlStyles.AllPaintingInWmPaint |
              ControlStyles.OptimizedDoubleBuffer |
              ControlStyles.UserPaint |
              ControlStyles.ResizeRedraw, true);
  
          }
  
          private readonly List&lt;Ellipse&gt; _clouds = new List&lt;Ellipse&gt;();
          public List&lt;Ellipse&gt; Clouds
          {
              get { return _clouds; }
          }
  
          protected override void OnPaint(PaintEventArgs e)
          {
              e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
              e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
              e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
  
              foreach (var cloud in _clouds)
              {
                  e.Graphics.FillEllipse(
                     cloud.Brush, cloud.Center.X, cloud.Center.Y,
                     cloud.Diameter, cloud.Diameter);
              }
  
              base.OnPaint(e);
          }
  
  
          private void pictureBox1Control_Load(object sender, EventArgs e)
          {
  
          }
      }
  }
  </code></pre>
  
  <p>But when im using it in form1 for example:</p>
  
  <pre><code>pictureBox1Control.Image
  </code></pre>
  
  <p>The Image property is not exist.
  I need to use this control as regular pictureBox1 and also as for other things.</p>
  
  <p>EDIT**</p>
  
  <p>Added paint event to the pictureBox:</p>
  
  <pre><code>pictureBox1 = new pictureBox1Control();
  pictureBox1.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);
  </code></pre>
  
  <p>But its never get to the paint event:</p>
  
  <pre><code> private void pictureBox1_Paint(object sender, PaintEventArgs e)  
   {
       e.Graphics.CompositingQuality = CompositingQuality.HighQuality;
       e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
       e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
       e.Graphics.Clear(Color.White);
       e.Graphics.DrawImage(pictureBox1.Image, movingPoint);
       CloudEnteringAlert.Paint(e.Graphics, currentfactor, distance);   
   }
  </code></pre>
  
  <p>Why the event never fire ?</p>