You are on page 1of 2

Public Class Form1

Private Sub ttBotonAñadir_Popup(ByVal sender As System.Object, ByVal


e As System.Windows.Forms.PopupEventArgs) Handles ttBotonAñadir.Popup

End Sub

Private Sub btAñadir_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles btAñadir.Click
If (ctDato.Text <> "") Then lsLista.Items.Add(ctDato.Text)
End Sub

Private Sub cvCursiva_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles cvCursiva.CheckedChanged
If (cvCursiva.Checked) Then ' si cvCursiva esta Señalada
ctDato.Font = New Font("Microsoft Sans Serif", 8.25!,
FontStyle.Italic)
Else ' si Cursiva no esta Señalada
ctDato.Font = New Font("Microsoft Sans Serif", 8.25!,
FontStyle.Regular)
End If
End Sub

Private Sub boLectura_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles boLectura.CheckedChanged
ctDato.ReadOnly = True
End Sub

Private Sub boEscritura_CheckedChanged(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles boEscritura.CheckedChanged
ctDato.ReadOnly = False
End Sub

Private Sub bdhColorTexto_Scroll(ByVal sender As System.Object, ByVal


e As System.Windows.Forms.ScrollEventArgs) Handles bdhColorTexto.Scroll
ctDato.ForeColor = Color.FromArgb(bdhColorTexto.Value,
bdhColorTexto.Value, bdhColorTexto.Value)
End Sub

Private Sub lsLista_SelectedIndexChanged(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles
lsLista.SelectedIndexChanged
ctDato.Text = lsLista.SelectedItem
End Sub

Private Sub SalirToolStripMenuItem_Click(ByVal sender As


System.Object, ByVal e As System.EventArgs) Handles separador.Click
Close()
End Sub

Private Sub itOpcionesColor_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles itOpcionesColor.Click
'Establece el color actual de la caja de texto como inicial
dlgColor.Color = ctDato.BackColor
'Mostrar el dialogo dlgColor
If (dlgColor.ShowDialog() = DialogResult.OK) Then
' Si se pulso Aceptar, establecer el color de fondo de la
' caja de texto
ctDato.BackColor = dlgColor.Color
End If
End Sub

Private Sub itAyudaAcercade_Click(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles itAyudaAcercade.Click
MessageBox.Show("Aplicacion Controles. Version 1.0" +
Environment.NewLine + "Copyright(c) Fco. Javier Ceballos, 2005", "Acerca
de Controles", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
End Class

You might also like