I had to use the current form with defining one in the Form1 class:
---------------------------------------------------------------------------------------------------------
namespace WindowsFormsApplication
{
public partial class Form1 : Form
{
internal static Form2 form2;
internal static Form1 form1;
public Form1()
{
InitializeComponent();
form1 = this;
}
private void buttonShowForm2_Click(object sender, EventArgs e)
{
form2 = new Form2();
form2.Show();
}
public void ShowText()
{
textBoxInForm1.Text = "Method Called From Another Form";
}
}
}
---------------------------------------------------------------------------------------------------------
namespace WindowsFormsApplication
{
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
private void buttonCallMethod_Click(object sender, EventArgs e)
{
Form1.form1.ShowText();
this.Close();
}
}
}
---------------------------------------------------------------------------------------------------------