private void Valor_auto_txb_Load(object sender, EventArgs e) { // FORMATEANDO EL TEXTO TRAIDO DESDE LA DB if (Valor_auto_txb.Text != "") { if (double.TryParse(Valor_auto_txb.Text, out Valor_Auto)) { Valor_auto_txb.Text = Valor_Auto.ToString("N0"); Valor_auto_txb.SelectionStart = Valor_auto_txb.TextLength; } } }
private void Valor_auto_txb_KeyUp(object sender, KeyEventArgs e) { // FORMATO AL TEXTO DEL VALOR if (Valor_auto_txb.Text != "") { if (double.TryParse(Valor_auto_txb.Text, out Valor_Auto)) { Valor_auto_txb.Text = Valor_Auto.ToString("N0"); Valor_auto_txb.SelectionStart = Valor_auto_txb.TextLength; } } }