codice:private void TextBox2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)Keys.Enter) { if (TextBox2.Text.Length == 0) { goto Linea; } else { TextBox2.Text = System.Globalization.CultureInfo.CurrentCulture.TextInfo.ToTitleCase(TextBox2.Text.Replace("'", "§")).Replace("§", "'"); } Linea: if (TextBox1.Text == "" || TextBox2.Text == "") { Application.Exit; } else { Salva(); }

Rispondi quotando