Description

The value that is returned to the parent form when the button is clicked.

Syntax

DialogResult [ = Long ]

Property Value

One of the DialogResult values. The default value is None

Remarks

If the value of this property is set to anything other than DialogResult.None, and if the parent form was displayed through the ShowDialog method, clicking the button closes the parent form without your having to hook up any events. The form's DialogResult property is then set to the DialogResult of the button when the button is clicked.

For example, to create a "Yes/No/Cancel" dialog, simply add three buttons and set their DialogResult properties to DialogResult.Yes, DialogResult.No, and DialogResult.Cancel.


The CHM file was converted to HTML by chm2web software.