You can pass a Form
instance as the first parameter to MessageBox.Show()
.
Calling MessageBox.Show from a separate form
-
01-07-2022 - |
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.
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow