How, being inside the main form of my WinForm app can I tell if there are any modal windows/dialogs open that belong to the main form?
Timers still run and fire events.
Example that works...
public partial class Form1 : Form
{
Form2 f2 = new Form2();
public Form1()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
f2.UpdateData(DateTime.Now.ToString());
if (!f2.Visible) f2.ShowDialog();
}
private void button1_Click(object sender, EventArgs e)
{
f2.ShowDialog();
MessageBox.Show("Done");
}
}