How to call Form2.cs from Form1.cs in modal and in non-modal style ?

K

Ken Williams

Assume I have two Forms Form1.cs and Form2.cs.

When a button but1-switch is clicked on Form1.ca the second Form2.cs should be called
and displayed.

How do I call the second Form2.cs in modal style ?

How would the same call look like if I call the second Form in non-modal style ?

Ken
 
P

Peter Duniho

[...]
How do I call the second Form2.cs in modal style ?

How would the same call look like if I call the second Form in non-modal
style ?

For any form, the ShowDialog() method displays the form modally, while the
Show() method displays it modelessly.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top