public void NewFile_Click(object sender, EventArgs e) { try { NewPaintForm NPF = new NewPaintForm(this); NPF.ShowDialog(this); } catch (Exception E) { MessageBox.Show(E.Message, "Error File", MessageBoxButtons.OK, MessageBoxIcon.Error); } }