jueves, 18 de septiembre de 2008

Còdigos de Visual Basic

Private Sub CATV_Click()
TVCATV.Caption = "CATV"
End Sub

Private Sub cero_Click()
auxiliar.Caption = auxiliar.Caption + "0"
End Sub

Private Sub cinco_Click()
auxiliar.Caption = auxiliar.Caption + "5"
End Sub

Private Sub cuatro_Click()
auxiliar.Caption = auxiliar.Caption + "4"
End Sub

Private Sub dos_Click()
auxiliar.Caption = auxiliar.Caption + "2"
End Sub

Private Sub ENTER_Click()
NroCANAL.Caption = auxiliar.Caption
auxiliar.Caption = ""
End Sub

Private Sub MAS_Click()
If TVCATV.Caption = "TV" Then
If NroCANAL.Caption < 13 Then
NroCANAL.Caption = NroCANAL.Caption + 1
Else
NroCANAL.Caption = 0
End If
Else
If NroCANAL.Caption < 130 Then
NroCANAL.Caption = NroCANAL.Caption + 1
Else
NroCANAL.Caption = 0
End If
End If
End Sub

Private Sub MAS2_Click()
tvv.Top = tvv.Top + 100
End Sub

Private Sub MAS3_Click()
tvv.Left = tvv.Left + 100
End Sub

Private Sub MENOS_Click(Index As Integer)
If NroCANAL.Caption < 1 Then
If TVCATV.Caption = "TV" Then
NroCANAL.Caption = 13
Else
NroCANAL.Caption = NroCANAL.Caption - 1
End If
If NroCANAL.Caption < 1 Then
If TVCATV.Caption = "CATV" Then
NroCANAL.Caption = 120
End If
End Sub

Private Sub MENOS3_Click(Index As Integer)
tvv.Left = tvv.Left - 100
End Sub

Private Sub nueve_Click()
auxiliar.Caption = auxiliar.Caption + "9"
End Sub

Private Sub ocho_Click()
auxiliar.Caption = auxiliar.Caption + "8"
End Sub

Private Sub OFF_Click()
NroCANAL.Caption = ""
TVCATV.Caption = ""
auxiliar.Caption = ""
Label2.BackColor = vbBlack
uno.Enabled = False
dos.Enabled = False
cero.Enabled = False
tres.Enabled = False
cuatro.Enabled = False
cinco.Enabled = False
seis.Enabled = False
siete.Enabled = False
ocho.Enabled = False
nueve.Enabled = False
End Sub

Private Sub ON_Click()
NroCANAL.Caption = "0"
TVCATV.Caption = "TV"
Label2.BackColor = vbRed
uno.Enabled = True
dos.Enabled = True
cero.Enabled = True
tres.Enabled = True
cuatro.Enabled = True
cinco.Enabled = True
seis.Enabled = True
siete.Enabled = True
ocho.Enabled = True
nueve.Enabled = True
End Sub

Private Sub onoff_Click()
If uno.Enabled = True Then
NroCANAL.Caption = ""
TVCATV.Caption = ""
auxiliar.Caption = ""
Label2.BackColor = vbBlack
uno.Enabled = False
dos.Enabled = False
cero.Enabled = False
tres.Enabled = False
cuatro.Enabled = False
cinco.Enabled = False
seis.Enabled = False
siete.Enabled = False
ocho.Enabled = False
nueve.Enabled = False
Else
NroCANAL.Caption = "0"
TVCATV.Caption = "TV"
Label2.BackColor = vbRed
uno.Enabled = True
dos.Enabled = True
cero.Enabled = True
tres.Enabled = True
cuatro.Enabled = True
cinco.Enabled = True
seis.Enabled = True
siete.Enabled = True
ocho.Enabled = True
nueve.Enabled = True
End If
End Sub

Private Sub seis_Click()
auxiliar.Caption = auxiliar.Caption + "6"
End Sub

Private Sub siete_Click()
auxiliar.Caption = auxiliar.Caption + "7"
End Sub

Private Sub tres_Click()
auxiliar.Caption = auxiliar.Caption + "3"
End Sub

Private Sub TV_Click()
TVCATV.Caption = "TV"
End Sub

Private Sub uno_Click()
auxiliar.Caption = auxiliar.Caption + "1"
End Sub