title: Raising an event when button clicked and subscribing it to eventhandler in another class?
body: <p>I have a form.cs which contains a button and a texbtox, and also a class which handles the event raised when the button is clicked.</p>
  
  <p>basically, when the button is clicked, it should raise an event and the eventHandler in Print class should print text to <code>TboxPrint</code> in the form</p>
  
  <p>this is how my code looks like:</p>
  
  <pre><code>//Declare the delegate
  public delegate void EventHandler(object sender, EventArgs e);
  
  public partial class Form1 : Form
  {
  
      public Form1()
      {
          InitializeComponent();
      }
  
      //event
      public event EventHandler Print;
  
      //Event caller, protected to prevent calling from other classes
      protected virtual void OnPrint(System.EventArgs e)
      {
          if (Print != null) Print(this, e);
      }
  
      //raising event
      public bool print_action(object value)
      {
          OnPrint(EventArgs.Empty);
          return true;
      }
  
      public void BtnPrint_Click(object sender, EventArgs e)
      {
          PrintClass p = new PrintClass();
          Form1 s = new Form1();
  
          s.Print += p.printEventHandler;
          print_action(true);
      }
  }
  </code></pre>
  
  <p>and the class with method handling the event is:</p>
  
  <pre><code>class PrintClass
  {
      public void printEventHandler(object sender, EventArgs e)
      {
  
          string text = "Print Event occured";
      }
  }
  </code></pre>
  
  <p>Apparently nothing is raised.. i believe the way i m raising the event or subscribing to the event handler is wrong. and how i pass the text in eventhandler back to form?</p>
  
  <p>any help is appreciated.. thanks</p>