lunes, 8 de septiembre de 2008

Códigos visual basic (Por Javier y Abi)

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 NroCANAL.Caption > 120 Then
NroCANAL.Caption = NroCANAL.Caption + 1
Else
NroCANAL.Caption = 1
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
NroCANAL.Caption = NroCANAL.Caption - 1
Else
NroCANAL.Caption = 120
End If
End Sub
Private Sub MENOS2_Click()
tvv.Top = tvv.Top - 100
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 = ''
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 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 uno_Click()
auxiliar.Caption = auxiliar.Caption + '1'
End Sub

No hay comentarios: