martes, 25 de noviembre de 2008

visual basic tv


Private Sub b0_Click()
tele.Caption = tele.Caption + "0"
End Sub

Private Sub b1_Click()
tele.Caption = tele.Caption + "1"
End Sub

Private Sub b2_Click()
tele.Caption = tele.Caption + "2"
End Sub

Private Sub b3_Click()
tele.Caption = tele.Caption + "3"
End Sub

Private Sub b4_Click()
tele.Caption = tele.Caption + "4"
End Sub

Private Sub b5_Click()
tele.Caption = tele.Caption + "5"
End Sub

Private Sub b6_Click()
tele.Caption = tele.Caption + "6"
End Sub

Private Sub b7_Click()
tele.Caption = tele.Caption + "7"
End Sub

Private Sub b8_Click()
tele.Caption = tele.Caption + "8"
End Sub

Private Sub b9_Click()
tele.Caption = tele.Caption + "9"
End Sub

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

Private Sub enter_Click()
ncanal.Caption = tele.Caption
tele.Caption = ""
End Sub

Private Sub mas1_Click()
If ncanal.Caption < caption =" ncanal.Caption" caption =" 1" top =" cuadrado1.Top" top =" tele.Top" left =" cuadrado1.Left" left =" tele.Left"> 1 Then
ncanal.Caption = ncanal.Caption - 1
Else
ncanal.Caption = 120
End If
End Sub

Private Sub menos2_Click()
cuadrado1.Top = cuadrado1.Top - 100
tele.Top = tele.Top - 100
End Sub

Private Sub menos3_Click()
cuadrado1.Left = cuadrado1.Left - 100
tele.Left = tele.Left - 100
End Sub

Private Sub OFF_Click()
tele.Caption = ""
tv2.Caption = ""
b1.Enabled = False
b2.Enabled = False
b3.Enabled = False
b4.Enabled = False
b5.Enabled = False
b6.Enabled = False
b7.Enabled = False
b8.Enabled = False
b9.Enabled = False
b0.Enabled = False
mas1.Enabled = False
mas2.Enabled = False
mas3.Enabled = False
menos1.Enabled = False
menos2.Enabled = False
menos3.Enabled = False
TV.Enabled = False
CATV.Enabled = False
enter.Enabled = False
tvcatv.Enabled = False
etiq.Caption = "OFF"
etiq.BackColor = vbBlack
etiq.ForeColor = vbWhite
tv2.BackColor = vbInactiveBorder
ncanal.BackColor = vbInactiveBorder
ncanal.Caption = ""
End Sub

Private Sub ON_Click()
tele.Caption = "0"
tv2.Caption = "TV"
b1.Enabled = True
b2.Enabled = True
b3.Enabled = True
b4.Enabled = True
b5.Enabled = True
b6.Enabled = True
b7.Enabled = True
b8.Enabled = True
b9.Enabled = True
b0.Enabled = True
mas1.Enabled = True
mas2.Enabled = True
mas3.Enabled = True
menos1.Enabled = True
menos2.Enabled = True
menos3.Enabled = True
TV.Enabled = True
CATV.Enabled = True
enter.Enabled = True
tvcatv.Enabled = True
etiq.Caption = "ON"
etiq.BackColor = vbDesktop
ncanal.BackColor = vbDesktop
ncanal.ForeColor = vbWhite
tv2.BackColor = vbDesktop
tv2.ForeColor = vbWhite
ncanal.Caption = ""
End Sub

Private Sub onoff_Click()
If b1.Enabled = True Then
tele.Caption = ""
tv2.Caption = ""
b1.Enabled = False
b2.Enabled = False
b3.Enabled = False
b4.Enabled = False
b5.Enabled = False
b6.Enabled = False
b7.Enabled = False
b8.Enabled = False
b9.Enabled = False
b0.Enabled = False
mas1.Enabled = False
mas2.Enabled = False
mas3.Enabled = False
menos1.Enabled = False
menos2.Enabled = False
menos3.Enabled = False
TV.Enabled = False
CATV.Enabled = False
enter.Enabled = False
tvcatv.Enabled = False
etiq.Caption = "OFF"
Else
tele.Caption = "0"
tv2.Caption = "TV"
b1.Enabled = True
b2.Enabled = True
b3.Enabled = True
b4.Enabled = True
b5.Enabled = True
b6.Enabled = True
b7.Enabled = True
b8.Enabled = True
b9.Enabled = True
b0.Enabled = True
mas1.Enabled = True
mas2.Enabled = True
mas3.Enabled = True
menos1.Enabled = True
menos2.Enabled = True
menos3.Enabled = True
TV.Enabled = True
CATV.Enabled = True
enter.Enabled = True
tvcatv.Enabled = True
etiq.Caption = "ON"
End If
End Sub

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

Private Sub tvcatv_Click()
If tv2.Caption = "TV" Then
tv2.Caption = "CATV"
Else
tv2.Caption = "TV"
End If
End Sub

No hay comentarios: