Public Class frmDAP Private oDAOGeneral As New DAOGeneral Private Operaciones As New Operaciones Private Sub frmDAP_Load(sender As Object, e As EventArgs) Handles MyBase.Load PrepararControles() End Sub Private Sub PrepararControles() CargarPeriodos() End Sub Private Sub CargarPeriodos() Me.cboPeriodicidad.DataSource = oDAOGeneral.ListaPeriodicidad Me.cboPeriodicidad.DisplayMember = "Descripcion" Me.cboPeriodicidad.ValueMember = "Codigo" Me.cboPeriodicidad.SelectedIndex = -1 End Sub Private Sub cboPeriodicidad_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboPeriodicidad.SelectedIndexChanged ControlPeriodicidad() End Sub Private Sub ControlPeriodicidad() End Sub Private Sub txtMontoInversion_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtMontoInversion.KeyPress If String.IsNullOrEmpty(txtMontoInversion.Text) Then If e.KeyChar = "." Then txtMontoInversion.Text = "0" Exit Sub End If End If If (Not txtMontoInversion.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then Operaciones.ValidarEntrada(sender, e, True) Else Operaciones.ValidarEntrada(sender, e, False) End If End Sub Private Sub txtPlazo_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtPlazo.KeyPress If String.IsNullOrEmpty(txtPlazo.Text) Then If e.KeyChar = "." Then txtPlazo.Text = "0" Exit Sub End If End If If (Not txtPlazo.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then Operaciones.ValidarEntrada(sender, e, True) Else Operaciones.ValidarEntrada(sender, e, False) End If End Sub Private Sub txtTasa_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtTasa.KeyPress If String.IsNullOrEmpty(txtTasa.Text) Then If e.KeyChar = "." Then txtTasa.Text = "0" Exit Sub End If End If If (Not txtTasa.Text.ToString.IndexOf(".") = -1 And e.KeyChar = ".") Then Operaciones.ValidarEntrada(sender, e, True) Else Operaciones.ValidarEntrada(sender, e, False) End If End Sub End Class