Reputation: 168
I have form1
calling form2
, which is asking for contact information. Once the form is filled in a save button is clicked. At the end of the save event, I would like form2
to close automatically returning to form1
. Everything that I have found discusses closing form1, when form2 is opened. Here is the code that I use to call form2
.
customer_Ship_ID = textBox_Customer_Ship_ID.Text;
using (Form Customer_Add_Contact_Form = new Customer_Add_Contact_Form(customer_Ship_ID))
{
Customer_Add_Contact_Form.ShowDialog();
}
The entire save event works perfectly and the user is finished. If the form would just close without clicking the 'X'
in the upper right corner of the form, that would be great.
Upvotes: 0
Views: 120