I’m coding in c# using visual studio 2010. I have 2 forms.
One form is used to allow users to sign in, and when they have entered their details the second form opens to prompt for more details.
(It was originally on one form but users ignored it, so I am using a second form as a popup.)
when the final selection has been made by the user the second form auto-closes and the details are processed and sent to a SQL server from the first form.
Only I cannot kick off the rest of the code automatically. Hence I am looking for a
Form2Closing(){
Form1.continuingcode;
}
method.
I have the continuingcode method working. I just need to kick it off when form2 closes.
Strictly speaking you could hook up the FormClosed or FormClosing events as the point to trigger your other code.
To be honest your code structure sounds a bit messy really. You would be better served having some kind of class that acts as a controller for the sign in process that is responsible for showing the first form and then the second form if the first step was completed successfully/correctly as I presume another option is for the user to simply cancel?