title: The proper way to check if a form is already shown?
body: <p>I have created a task managment application and I wanted to implement the ability for 2-users to chat about specific task.</p>
  
  <p>In <code>Form1</code> I have a timer that check on the database for  any new message sent. When a new message found, the chat form appear showing the message.</p>
  
  <p>Till now, everything is working as expected but I have only one problem.</p>
  
  <p><strong>The problem :</strong>
  Once a new message found for the first time, the chat window appear, but when another new message is found, another window appear, and for each new message I have a new instance of the chat window created.</p>
  
  <p>The code I'm using :</p>
  
  <pre><code> List&lt;string&gt; tasksToDiscuss = checkForTasksToDiscuss(fullname);
  
          if (tasksToDiscuss.Count &gt; 0) { 
   // open the chat window directly minimized
   Form14 frm14 = new Form14();
   frm14.get_from = fullname;
   frm14.get_to = tasksToDiscuss[1];
   frm14.get_task_id = int.Parse(tasksToDiscuss[3]);
   // set message as read
   if (setMessageAsRead(tasksToDiscuss[1], fullname, int.Parse(tasksToDiscuss[3])))
                      {
                          // now show the chat window minimized
                          frm14.Show();
                      }
  
   }
  </code></pre>
  
  <p>I tried to replace the line: <br> <code>frm14.Show();</code> with <code>frm14.ShowDialog();</code></p>
  
  <p>I noticed that when the new message is received, the chat window (form14) is shown, and when another message is received from the same user, no new chat window appear, but the problem is that after i close the chat window, it doesn't appear anymore even when i receive new messages.</p>
  
  <p>What I think to do is to change the chat window (Form14.Text) to the user fullname, and the next time a message is received, I check whether the specific window is already open, then don't open it otherwise i show the form using the <code>.Show()</code> method.</p>
  
  <p><strong>Is this the proper way to make the window doesn't appear if a new message is received and it is aloready opened ? and How to check wether a window is opened according to it's Text (title bar text) ?</strong></p>
  
  <p>Thank's for taking time reading my question. Any help would be highly appreciated</p>