you can pass a reference to your MainForm and call the event you want. Something like this. But still, you can variate to something you are comfortable with. C# is flexible.
Form1 is the main form
Code:
static void Main()
{
Application.Run(new Form1());
}
public void button2_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Button 2 Clicked");
}
private void button1_Click(object sender, System.EventArgs e)
{
new Form2(this).ShowDialog();
}
and on Form2
Code:
Form1 caller;
public Form2(Form1 f)
{
InitializeComponent();
this.caller=f;
}
private void Form2_Load(object sender, System.EventArgs e)
{
}
private void button1_Click(object sender, System.EventArgs e)
{
caller.button2_Click(this,e);
}
Hope this helps.