34,333
edits
Changes
→Writing C# Code to Display a Non-Modal Form
== Writing C# Code to Display a Non-Modal Form ==
We will now modify the event procedure for the button to create a modal form. To do so we need to call the ''ShowDialog()'' method of the ''subForm''. Modify the ''Click'' event procedure of the ''mainForm'' button as follows: