0

I declared a form in a c# auto updater programme

SharpUpdateDownloadForm form = new SharpUpdateDownloadForm(update.Uri, update.MD5, applicationInfo.ApplicationIcon);
//applicationInfo.Context is 'myForm1'     
DialogResult result = form.ShowDialog(applicationInfo.context);

what is the reason that 'form.ShowDialog(applicationInfo.context)' return 'NO as the result ?

Hans Kesting
  • 38,117
  • 9
  • 79
  • 111
Yuresh Karunanayake
  • 519
  • 1
  • 4
  • 10

1 Answers1

2

The DialogResult will show you the outcome of the modal operation that is performed on the form. The most common way to determine the result is with the button the user has pressed. In case of DialogResult.No, the user has pressed the No button (usually on a Yes/No or Yes/No/Cancel dialog).

Having said that, eventually it is up to the form to determine the result it returns. In case the form closes itself, it will automatically determine a result. Which result that is depends on the implementation of the form. So you should check SharpUpdateDownloadForm for what it does or referer to the respective documentation (if available).

Sefe
  • 13,731
  • 5
  • 42
  • 55