Ok, so I have Form1 calling Form2 in a way that allows me to access Form1’s functions from Form2. Code Below…
Form1….
private void btnShowForm2_Click(object sender, EventArgs e)
{
frmForm2 tempDialog = new frmForm2(this);
tempDialog.ShowDialog();
}
Form2…
private frmForm1 _parent;
public frmForm2(frmForm1 frm1)
{
InitializeComponent();
_parent = frm1;
}
private void btnDoFunction_Click(object sender, EventArgs e)
{
_parent.DoProcess();
}
Now I have a new problem. I’m trying to update a status label of Form2, but the function that’s processing the task at hand is in Form1. How can I change the label of Form2 from within the Function of Form1?
You can do so using delegate and event.