private void DT_Vencto_Leave(object sender, EventArgs e) { if ((DT_Pgto.Text.Trim() != string.Empty) && (DT_Pgto.Text.Trim() != "/ /") && (DT_Vencto.Text.Trim() != string.Empty) && (DT_Vencto.Text.Trim() != "/ /")) { if (DT_Vencto.Data.Date < DT_Pgto.Data.Date) { MessageBox.Show("Data de vencimento do cheque não pode ser menor que a data de emissão.", "Mensagem", MessageBoxButtons.OK, MessageBoxIcon.Information); DT_Vencto.Focus(); } } }
private void DT_Vencto_Enter(object sender, EventArgs e) { DT_Vencto.Select(0, DT_Vencto.Text.Length - 1); }