Documente Academic
Documente Profesional
Documente Cultură
CODIGO FUENTE
Class: Declara el nombre de una clase, as como una
definicin de las variables, propiedades, eventos y
mtodos que
la componen.
#Region: Contrae y oculta secciones de cdigo en
archivos de Visual Basic .NET.
En el ejemplo siguiente se utiliza la directiva #Region.
#Region "MathFunctions"
#End Region
Finalizado el diseo se debe programar la lgica
operacional de respuesta a cada uno de los eventos que
ocurran:
Private Sub radRojo_CheckedChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
radRojo.CheckedChanged
lblTop.BackColor = System.Drawing.Color.Red
End Sub
Private Sub radBlanco_CheckedChanged(ByVal sender
End Sub
Private Sub radNegro_CheckedChanged(ByVal sender
As System.Object, ByVal e As System.EventArgs)
Handles
radNegro.CheckedChanged
lblRight.BackColor = System.Drawing.Color.Black
End Sub
Private Sub btnSalir_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnSalir.Click
Me.Close()
End Sub
Private Sub btnSinColor_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnSinColor.Click
lblTop.BackColor = System.Drawing.Color.White
lblLeft.BackColor = System.Drawing.Color.White
lblRight.BackColor = System.Drawing.Color.White
End Sub
Private Sub Ej01_01_Load(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load
lblTop.BackColor = System.Drawing.Color.White
lblMid.BackColor = System.Drawing.Color.White
lblLeft.BackColor = System.Drawing.Color.White
lblRight.BackColor = System.Drawing.Color.White
End Sub
End Class