When a user selects something on a form, I want to pop up a window with 4 text boxes that they can enter info into and click a button that sends the info back to the original form.
Create the popup form with the four fields on it and an OK and Cancel button. Add four properties to the form to expose the values of the four text boxes.
Then in the main form you will create an instance of the popup, display it and then retrieve data from it when it is closed. It will look something like this in the main form.
MyPopupForm popup = new MyPopupForm();
popup.ShowDialog();
if (popup.DialogResult == DialogResult.OK)
{
// Get data from the popup form
this.txtOne = popup.FieldOne;
this.txtTwo = popup.FieldTwo;
// etc
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.