Codigo Visual Basic 6.0

Páginas: 7 (1629 palabras) Publicado: 23 de julio de 2012
CODIGO
Private Sub ENTRAR_Click()
Dim CODIGO As String
CLAVE = "1234"
If CLAVE = Text1.Text Then
FRMMENU.Show
Else
MsgBox ("ERROR CLAVE INCORRECTA")
End If
Beep
End Sub

PROMEDIO

Private Sub Command1_Click()
txt1 = ""
txt2 = ""
txt3 = ""
txt4 = ""
txt5 = ""
txt6 = ""
txt7 = ""
txt8 = ""
txt9 = ""
End Sub

Private Sub Command2_Click()
FRMMENU.Show
End SubPrivate Sub prom_Click()

Dim Cal As Double
Dim Fis As Double
Dim Ing As Double
Dim Apl As Double
Dim Elab As Double
Dim Dis As Double
Dim Comn As String
Dim Prom As Double
Dim Ecl As Double

Cal = Val(txt1): Fis = Val(txt2)
Ing = Val(txt3): Apl = Val(txt4)
Elab = Val(txt5): Dis = Val(txt6)
Comn = Val(txt8): Ecl = Val(txt9)
Prom = Val(txt7)
txt7 = Str(Prom)

Prom = ((Cal + Fis +Ing + Apl + Elab + Dis + Ecl) / 7)
txt7 = Str(Prom)
If Prom >= 5.5 And Prom <= 10 Then
txt8 = "Aprobado"
End If

If Prom >= 0 And Prom <= 5.5 Then
txt8 = "Reprobado"
End If
End Sub


Private Sub SALIR_Click()
End

End Sub
CONVERM
Private Sub Command1_Click()
'Si está seleccionado el Option1 se ejecuta la siguiente condición'
If Option1.Value = TrueThen
Text2 = Option1 * Text1 * Option16
End If
'Si está seleccionado el Option2 se ejecuta la siguiente condición'
If Option2.Value = True Then
Text2 = Option2 * Text1 * Option15
End If
'Si está seleccionado el Option3 se ejecuta la siguiente condición'
If Option3.Value = True Then
Text2 = Option3 * Text1 * Option14
End If
'Si está seleccionado el Option4 se ejecuta la siguientecondición'
If Option4.Value = True Then
Text2 = Option4 * Text1 * Option13
End If
'Si está seleccionado el Option5 se ejecuta la siguiente condición'
If Option5.Value = True Then
Text2 = Option5 * Text1 * Option12
End If
'Si está seleccionado el Option6 se ejecuta la siguiente condición'
If Option6.Value = True Then
Text2 = Option6 * Text1 * Option11
End If
'Si está seleccionado el Option7 seejecuta la siguiente condición'
If Option7.Value = True Then
Text2 = Option7 * Text1 * Option10
End If 'Si está seleccionado el Option8 se ejecuta la siguiente condición'
If Option8.Value = True Then
Text2 = Option8 * Text1 * Option9
End If
End Sub
CONVERG
Option Explicit

Private Sub cmdSalir_Click()
Beep
End
End Sub

Private Sub mnuFileExit_Click()
End
End Sub

PrivateSub vsbTemp_Change()
TxtCent.Text = vsbTemp.Value
txtFahr.Text = 32 + 1.8 * vsbTemp.Value
End Sub
TABLAS

Private Sub Command1_Click()
'Si está seleccionado el Option1 se ejecuta la siguiente condición'
If Option1.Value = True Then
Label1.Caption = " 1 x 1 = 1"
Label2.Caption = " 1 x 2 =2"
Label3.Caption = " 1 x3 =3"
Label4.Caption = " 1 x 4=4"
Label5.Caption = " 1 x 5=5"Label6.Caption = " 1 x 6 =6"
Label7.Caption = " 1 x 7=7"
Label8.Caption = " 1 x 8=8"
Label9.Caption = " 1 x 9 =9"
Label10.Caption = " 1 x10 =10"

End If

'Si está seleccionado el Option2 esta'
If Option2.Value = True Then
Label1.Caption = "2 x 1 =2"
Label2.Caption = "2 x 2 =4"
Label3.Caption = "2 x3 =6"
Label4.Caption = "2 x 4=8"
Label5.Caption = "2 x 5=10"
Label6.Caption = "2 x 6=12"
Label7.Caption = "2 x 7=14"
Label8.Caption = "2 x 8=16"
Label9.Caption = "2 x 9 =18"
Label10.Caption = "2 x10 =20"

End If

'Si está seleccionado el Option3 se ejecuta esta otra'
If Option3.Value = True Then
Label1.Caption = "3 x 1 =3"
Label2.Caption = "3 x 2 =6"
Label3.Caption = "3 x3 =9"
Label4.Caption = "3 x 4=12"
Label5.Caption = "3 x 5=15"
Label6.Caption = "3 x 6 =18"Label7.Caption = "3 x 7=21"
Label8.Caption = "3 x 8=24"
Label9.Caption = "3 x 9 =27"
Label10.Caption = "3 x10 =30"
End If

'Si está seleccionado el Option4 se ejecuta esta otra'
If Option4.Value = True Then
Label1.Caption = "4 x 1 =4"
Label2.Caption = "4 x 2 =8"
Label3.Caption = "4 x3 =12"
Label4.Caption = "4 x 4=16"
Label5.Caption = "4 x 5=20"
Label6.Caption = "4 x 6 =24"...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • SQL Visual Basic 6.0
  • Visual Basic 6.0
  • visual basic 6.0
  • Programas en Visual Basic 6.0
  • Visual Basic 6.0
  • Variables Visual Basic 6.0
  • Visual Basic 6.0
  • Visual Basic 6.0

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS