title: InitializeComponent in C# doesn't exsist
body: <p>I am using .net 4 and I don't see  the InitializeComponent method. Is it there?</p>
  
  <p>Here is my class file that i am using</p>
  
  <pre><code>using System;
  using System.Drawing;  //must add reference
  using System.ComponentModel;
  using System.Collections;
  using System.Windows.Forms;  //must add reference
  using System.Threading;
  using System.Net.Sockets;
  using System.IO;
  
  
  public class Client : System.Windows.Forms.Form
  {
      private System.Windows.Forms.TextBox inputTextBox;
      private System.Windows.Forms.TextBox displayTextBox;
  
      private NetworkStream output;
      private BinaryWriter writer;
      private BinaryReader reader;
  
      private string message = "";
      private Thread readThread;
  
  
      private System.ComponentModel.Container components = null;
  
      //default constructor
      public Client()
      {
  
          InitializeComponent();
  
          readThread = new Thread(new ThreadStart(RunClient));
          readThread.Start();
      }
  
      [STAThread]
      static void Main()
      {
          Application.Run(new Client());
      }
  
      protected void Client_Closing(object sender, CancelEventArgs e)
      {
          System.Environment.Exit(System.Environment.ExitCode);
      }
  
  
      //sends text the user typed to server
      protected void inputText_KeyDown(object sender, KeyEventArgs e)
      {
  
          try
          {
              if (e.KeyCode == Keys.Enter)
              {
                  writer.Write("CLIENT&gt;&gt;&gt;&gt; " + inputTextBox.Text);
  
                  displayTextBox.Text += "\r\nCLIENT&gt;&gt; " + inputTextBox.Text;
  
                  inputTextBox.Clear();
              }
  
  
          }
          catch
          {
              displayTextBox.Text += "\nError writing object";
          }
      } //end method inputTextBox_KeyDown
  
  
      //connects to server and display server-generated text
      public void RunClient()
      {
  
          TcpClient client;
  
          //Instantiate TcpClient for sending data to server
          try
          {
              displayTextBox.Text += "Attempting connection...\r\n";
  
              //Step 1: create TcpClient and connect to server
              client = new TcpClient();
              client.Connect("localhost", 5000);
  
              //Step 2: Get NetworkStream associated with TcpClient
              output = client.GetStream();
  
              //creates objects for writing and reading across streams
              writer = new BinaryWriter(output);
              reader = new BinaryReader(output);
  
              displayTextBox.Text += "\r\nGot I/O stream\r\n";
  
              inputTextBox.ReadOnly = false;
  
              //loop until server signals termination
              do
              {
  
                  //Step 3: processing phase
                  try
                  {
                      //read message from the server
                      message = reader.ReadString();
                      displayTextBox.Text += "\r\n" + message;
                  }
  
                  //handle exception if error in reading server data
                  catch (Exception)
                  {
                      System.Environment.Exit(System.Environment.ExitCode);
                  }
  
  
              } while (message != "SERVER&gt;&gt;&gt; TERMINATE");
  
              displayTextBox.Text += "\r\nClosing connection.\r\n";
  
              //Step 4: close connection
              writer.Close();
              reader.Close();
              output.Close();
              client.Close();
              Application.Exit();
  
          }
          catch (Exception error)
          {
              MessageBox.Show(error.ToString());
          }
      }
  
  }
  </code></pre>