Domanda

I'm wondering today if there is any way to show a messagebox with a separate form as it's parent. As an example, say I have Form1 and Form2. From Form1, how do I call a messagebox to show with Form2 as the parent? In my case, Form2 is dynamically created, if that makes a difference.

È stato utile?

Soluzione

You can pass a Form instance as the first parameter to MessageBox.Show().

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top