private void ShowWindow(User From) { if (msgWindows.ContainsKey(From)) { msgWindows[From].Show(); msgWindows[From].Activate(); } else { frmMessage newWindow = new frmMessage(); newWindow.Images = imgChamps; newWindow.StartPosition = FormStartPosition.Manual; newWindow.Location = new Point(SystemInformation.VirtualScreen.Width / 2 - 100 + msgWindows.Count * 30, SystemInformation.VirtualScreen.Height / 2 - 100 + msgWindows.Count * 30); newWindow.theUser = From; newWindow.Closed += new frmMessage.CloseHandler(newWindow_Closed); newWindow.jm = jm; msgWindows.Add(From, newWindow); newWindow.Show(); } }