Let’s say, I have 2 WinForms here, Form1 and Form2 respectively. And then I made Form1 hidden. I wonder how I could write the code in Form2 to detect if Form1 object is still running or not.
I was trying to use Form1.ActiveForm but it seems to give me NULL value. Any better ideas? Thanks.
You could use my method to get any active forms: