using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication2{public partial class Form1 : Form{public Form1(){InitializeComponent();}private void Form1_Load(object sender, EventArgs e){}private void Key_Click(object sender, EventArgs e){OtherClass other = new OtherClass();Button currentkey = (Button)sender;string KeyText = currentkey.Text;//Display(KeyText); //Prints OK from here.other.GetTheKey(KeyText); // send the key number to OtherClass.}public void Display(string text) //Will print OK with call from this class.{ // will not print from another class call.richTextBox1.AppendText(text);}}class OtherClass{public OtherClass(){}public void GetTheKey(string KeyText) //Called by the Form1 to transfer eack keystroke.{Form1 form1 = new Form1();form1.Display(KeyText);}}}