There I have a button_click
event and when it happens it opens a new Form. How do I lock the principal Form, so that it can't be looked at or changed until new Form is closed?
Here's my event handler:
private void button4_Click(object sender, EventArgs e)
{
Form2 f = new Form2();
f.Show();
}
Try showing the child form as a modal window:
Form2 f = new Form2();
f.ShowDialog();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With