title: Why this message: does not contain a definition for 'Controls' and no extension method 'Controls' accepting a first argument
body: <p><strong>Hi,</strong></p>
  
  <p>What I'm doing is a method to display images from a specific folder but when I debug I'm getting this error on the last line of code and I have no idea why.**</p>
  
  <pre><code>Error 3 'MBKiosk.classTools' does not contain a definition for 'Controls' and no extension    
  method 'Controls' accepting a first argument of type 'MBKiosk.classTools' could be found (are you 
  missing a using directive or an assembly reference?)
  </code></pre>
  
  <p><strong>Thanks for any help.</strong></p>
  
  <p><strong>Here is the code:</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Threading.Tasks;
  using System.Data.SqlClient;
  using System.Data;
  using System.IO;
  using System.Windows.Forms;
  using System.Drawing;
  using System.ComponentModel;
  using System.Collections.ObjectModel;
  using MBKiosk;
  
  namespace MBKiosk
  {
      class classTools
      {
          public void ShowImages(string path)
          {
              FlowLayoutPanel imagePanel = new FlowLayoutPanel();
              imagPanel.FlowDirection = FlowDirection.LeftToRight;
              imagePanel.Size = new Size(1240, 630);
              imagePanel.Location = new Point(12, 344);
              imagePanel.WrapContents = true;
              imagePanel.AutoScroll = false;
              DirectoryInfo dInfo = new DirectoryInfo(path);
              foreach (FileInfo file in dInfo.GetFiles())
              {
                  System.Diagnostics.Debug.Print(file.Extension);
                  if ((file.Extension == ".jpg") || (file.Extension == ".gif") || (file.Extension == 
                      ".png"))
                  {
                      PictureBox image = new PictureBox();
                      image.Image = Image.FromFile(file.FullName);
                      image.SizeMode = PictureBoxSizeMode.Normal;
                      image.Size = new Size(180, 108);
                      imagePanel.Controls.Add(image);
                      imagePanel.Refresh();
                  }
              }
              this.Controls.Add(imagePanel);
          }   
      }
  }
  </code></pre>