1.) Create the form you talked about with all the necessary user interface elements. Also add the OK and Cancel buttons to it.
2.) On the properties panel for the OK and Cancel buttons, set the DialogResult values ββto OK and Cancel, respectively. In addition, you can also set the Form CancelButton property as the name of the created Cancel button.
3.) Add additional properties to the dialog that corresponds to the values ββyou want to return.
4.) To display a dialog box, do something in the lines
using( MyDialog dialog = new MyDialog() ) { DialogResult result = dialog.ShowDialog(); switch (result) {
dotnetnate
source share