Skip to main content
Dominique Sacre
Rocketeer
Feb 15, 2013 10:49 PM UTC

In .NET WinForms How to show a form as a Modal Dialog Box?

Problem:

In .NET WinForms how to show a form as a Modal Dialog Box?

Resolution:

Showing a form as a Modal Dialog Box by using the "ShowDialog" method. This will display the form as a Dialog Box and return a value that allows to determine if OK orCANCEL was pressed.

For example:

     set ls-result to ls-Form4::"ShowDialog"(self)

The ShowDialog method takes the parent window as a parameter.

Old KB# 4408