@DIV private void 終了_Click(object sender, EventArgs e) { Application.Exit(); } private void 社員コード_Validating(object sender, CancelEventArgs e) { if (this.社員コード.Text.Trim() == "") { e.Cancel = true; MessageBox.Show("必須入力です"); } } @END