public static void ShowError(string customMsg) { ErrWindow cw = new ErrWindow(); cw.txtMesage.Text = customMsg; cw.Title = "LogPro Express :: Error Message !"; if (customMsg.Length > 100) { cw.Height = 300; cw.Width = 700; } cw.ShowDialog(); }