title: Cant create component userControl in windows form:
body: <p>In my project "teacher_gui_windows_form" I am trying to drag a userControl that I made from the toolbox to my form "teacher_gui" but it gives me the error:
  "Failed to create component 'StudentControl'. The error message follows: System.MissingMethodException Constructor on type 'teacher_gui_windows_form.StudentControl' not found."</p>
  
  <p>But I do have a StudentControl constructor.
  The StudentControl class uses another form, and here is its class code:</p>
  
  <pre><code>public partial class StudentControl : UserControl
  {
      const int Num = 10;
      Image image;
      string message;
      public StudentForm studentForm = null;
  
      public StudentControl(Image image, string Ip, int index)
      {
          InitializeComponent();
          this.image = image;
          pictureBoxImage.Image = image;
          labelIp.Text = Ip;
          Location = new Point(index % Num * (Width + 5), index / Num * (Height + 5));
      }
  
      public void ChangeImage(Image image)
      {
          pictureBoxImage.Image = image;
      }
  
      private void StudentControl_Click(object sender, EventArgs e)
      {
          studentForm = new StudentForm(pictureBoxImage.Image);
          studentForm.ShowDialog();
      }
  
      private void pictureBoxImage_Click(object sender, EventArgs e)
      {
          studentForm = new StudentForm(pictureBoxImage.Image);
          studentForm.ShowDialog();
      }
  
      private void labelIp_Click(object sender, EventArgs e)
      {
          studentForm = new StudentForm(pictureBoxImage.Image);
          studentForm.ShowDialog();
      }
  
      private void seizeToolStripMenuItem_Click(object sender, EventArgs e)
      {
  
      }
  
      private void sendMessageToolStripMenuItem_Click(object sender, EventArgs e)
      {
  
      }
  }
  </code></pre>
  
  <p>Does anyone know why is this happening?
  Thanks!</p>