So I basically have a form that is opened and I need to check what form called that one to open
"Parent form"
private void btnEnter_Click(object sender, EventArgs e)
{
this.Close();
newForm nf = new newForm();
nf.Show()
}
"Opened form"
private void newForm_Load(object sender, EventArgs e)
{
if parent is ("oldForm") // Need to know how to code for this line.
{
//do some stuff here
}
else
{
//Do something different
}
}
So for example if oldForm was the form that called this one, something specific would happen that wouldn't if "anotherForm" called it for example