Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top