Form.Close does not close form, instead changes from modal to modeless

When I call Form.Close for a modal dialog, it changes the dialog to modeless and does not close the form (until I call Close again).

This is the CF 1.1 and the strange thing is, this ONLY happens on the emulator. On the real device, everything works as expected. I've tried WinCE 4.1 and 4.2 images on the emulator with the same problem. The real device (which works) is running 4.2.


Answer this question

Form.Close does not close form, instead changes from modal to modeless

  • smartmani

    If you want to close a modal dialog (one shown with form.ShowDialog()), you should not use the Close() method. Instead, you should set the DialogResult property.

  • Form.Close does not close form, instead changes from modal to modeless