My understanding is that your final goal is to save in a DB name and surname and then eventually also payment details such as date and amount. For your own reasons you wont to display these input fields in two different forms. So, Form 1 could stay as it is. When Form 2 is open you need to prevent the user to close Form1 until save or cancel on Form 2 is clicked.
There are various possible approach to such scenario, the simple one could be to remove the close button from Form 1 when and until Form 2 is open. To achieve such, you can implement something like this:
private const int CP_NOCLOSE_BUTTON = 0x200;
protected override CreateParams CreateParams
{
get
{
CreateParams myCp = base.CreateParams;
myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON ;
return myCp;
}
}
reference for the above is codeproject
Another alternative could be to make your Form1 and Form 2 not movable on the screen and overlapping each other so that the user cannot access the closing button of Form 1 so he is forced to close Form 2 to get access to Form 1. Reference for such feature can be found here on SO. There other ways to do the above but this is what I had in mind now. Let us know.