Páginas
miércoles, 23 de septiembre de 2015
viernes, 12 de junio de 2015
EJEMPLO VISUAL BASIC
Ejemplo uso de condicionales:
Private Sub cmdVer_Click()
If Val(txtDinero.Text) > 10000 Then
frmCoche.Show
MsgBox "Cómprate un coche"
Else
frmMoto.Show
MsgBox "Cómprate una moto"
End If
End Sub
Para cerrar un panel secundario:
Private Sub cmdSalir_Click()
Unload Me
End Sub
Mas condicionales:
Private Sub cmdBorrar_Click()
txtBarra.Text = ""
End Sub
Private Sub hscDinero_Change()
txtBarra.Text = hscDinero.Value
If Val(txtBarra.Text) > 500 Then
txtResultado.Text = " ZONA CALIENTE "
txtResultado.BackColor = vbRed
txtResultado.ForeColor = vbBlack
txtResultado.Left = 5160
Else
txtResultado.Text = " ZONA FRIA"
txtResultado.BackColor = vbBlue
txtResultado.ForeColor = vbWhite
txtResultado.Left = 840
End If
End Sub
Private Sub cmdVer_Click()
If Val(txtDinero.Text) > 10000 Then
frmCoche.Show
MsgBox "Cómprate un coche"
Else
frmMoto.Show
MsgBox "Cómprate una moto"
End If
End Sub
Para cerrar un panel secundario:
Private Sub cmdSalir_Click()
Unload Me
End Sub
Mas condicionales:
Private Sub cmdBorrar_Click()
txtBarra.Text = ""
End Sub
Private Sub hscDinero_Change()
txtBarra.Text = hscDinero.Value
If Val(txtBarra.Text) > 500 Then
txtResultado.Text = " ZONA CALIENTE "
txtResultado.BackColor = vbRed
txtResultado.ForeColor = vbBlack
txtResultado.Left = 5160
Else
txtResultado.Text = " ZONA FRIA"
txtResultado.BackColor = vbBlue
txtResultado.ForeColor = vbWhite
txtResultado.Left = 840
End If
End Sub
martes, 20 de enero de 2015
viernes, 16 de enero de 2015
viernes, 28 de noviembre de 2014
martes, 25 de noviembre de 2014
Suscribirse a:
Entradas (Atom)



.jpg)