Páginas

miércoles, 16 de noviembre de 2011

Boleta de Pago


Esta aplicación es una boleta de pago en el cual indica el Salario Neto.
A continuación su programación :

Private Sub Check1_Click()
Text5.Text = Text2.Text * 0.03
End Sub

Private Sub Check2_Click()
Text6.Text = Text2.Text * 0.07
End Sub

Private Sub Check3_Click()
Text7.Text = Text2.Text * 0.01
End Sub

Private Sub Command1_Click()
Dim k, m, n As Integer

k = Text2.Text
m = Text3.Text
n = Text4.Text


Text8.Text = (((k + (m * n)) - (Text5.Text)) - Text6.Text) - Text7.Text

End Sub


Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Option1_Click()
Text4.Text = 10000
End Sub

Private Sub Option2_Click()
Text4.Text = 15000
End Sub

martes, 1 de noviembre de 2011

Edad












Esta aplicación sirve para consultar la Edad de una persona.
A continuación la programación:


Private Sub Command1_Click()
Dim a As Date, b As Integer
a = CDate(Text1.Text)
b = CInt((Date - a) / 365)
Text2.Text = Str(b) & "años"
End Sub


Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub

Encuesta 11-2 Academico

Encuesta 11-2 Academico

lunes, 3 de octubre de 2011

Restaurante











Esta aplicación sirve para consultarl el Precio de la Venta Total Mas el Impuesto, según lo que haya consumido.
A continuacion la Programacion:
Private Sub Command1_Click()
Dim a, b, c, d, e, f, g, h, i, j As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
d = Val(Text4.Text)
e = Val(Text5.Text)
f = Val(Text6.Text)
g = Val(Text7.Text)
h = Val(Text8.Text)
i = (a * 2500) + (b * 4000) + (c * 3000) + (d * 1500) + (e * 2000) + (f * 1000) + (g * 1500) + (h * 1500)
Text9.Text = i
j = (i * 0.18)
Text10.Text = j
Text9.Text = (i + j)
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Text10.Text = ""
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
MSHFlexGrid1.Cols = 2
MSHFlexGrid1.Rows = 9
MSHFlexGrid1.FixedCols = 0
MSHFlexGrid1.FixedRows = 1
MSHFlexGrid1.TextArray(0) = "Menú"
MSHFlexGrid1.TextArray(1) = "Precio"
MSHFlexGrid1.TextArray(2) = "Hamburguesa"
MSHFlexGrid1.TextArray(3) = "2.500"
MSHFlexGrid1.TextArray(4) = "Cerveza"
MSHFlexGrid1.TextArray(5) = "4.000"
MSHFlexGrid1.TextArray(6) = "Gaseosa"
MSHFlexGrid1.TextArray(7) = "3.000"
MSHFlexGrid1.TextArray(8) = "Ensalada"
MSHFlexGrid1.TextArray(9) = "1.500"
MSHFlexGrid1.TextArray(10) = "Salchichas"
MSHFlexGrid1.TextArray(11) = "2.000"
MSHFlexGrid1.TextArray(12) = "Refresco"
MSHFlexGrid1.TextArray(13) = "1.000"
MSHFlexGrid1.TextArray(14) = "Sopa"
MSHFlexGrid1.TextArray(15) = "1.500"
MSHFlexGrid1.TextArray(16) = "Postre"
MSHFlexGrid1.TextArray(17) = "1.500"
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text2.SetFocus

End If
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text3.SetFocus

End If
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text4.SetFocus

End If
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text5.SetFocus

End If
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text6.SetFocus

End If
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text7.SetFocus

End If
End If
End Sub
Private Sub Text7_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text8.SetFocus

End If
End If
End Sub
Private Sub Text8_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text9.SetFocus

End If
End If
End Sub
Private Sub Text9_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text10.SetFocus

End If
End If
End Sub
Private Sub Text10_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
Text1.SetFocus
Else
Text11.SetFocus

End If
End If
End Sub

lunes, 26 de septiembre de 2011

Calcular el Salario neto de un Trabajador.










Esta aplicación sirve para calcualas el Salario Neto de un trabajador.
A continuacion la programacion:
Private Sub Command1_Click()
Text4.Text = Text2 * Text3
Text5.Text = 0.2 * Text4
Text6.Text = Text4 - Text5
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub




Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text2.SetFocus

End If
End If
End Sub



Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text3.SetFocus

End If
End If
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text4.SetFocus

End If
End If
End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text6.SetFocus

End If
End If
End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text1.Text = "" Then
MsgBox ("DIGITE UN NOMBRE")
Text1.SetFocus
Else
Text6.SetFocus

End If
End If
End Sub

lunes, 19 de septiembre de 2011


 Esta aplicacion  muestra las componentes de la Cocina.
A continuacion son los codigos de Visual Basic :

Private Sub Command1_Click()
End
End Sub

Private Sub Label10_Click()
Label1.Caption = "Gabinete"
End Sub

Private Sub Label11_Click()
Label1.Caption = "Servilletas"
End Sub

Private Sub Label2_Click()
Label1.Caption = "Estufa"
End Sub

Private Sub Label3_Click()
Label1.Caption = "Florero"
End Sub

Private Sub Label4_Click()
Label1.Caption = "Olla"
End Sub

Private Sub Label5_Click()
Label1.Caption = "Delantales"
End Sub

Private Sub Label6_Click()
Label1.Caption = "Horno"
End Sub

Private Sub Label7_Click()
Label1.Caption = "Estractor"
End Sub

Private Sub Label8_Click()
Label1.Caption = "Vasos"
End Sub

Private Sub Label9_Click()
Label1.Caption = "Silla"
End Sub

Componentes de la PC


En etsa aplicaccion se muestra los componentes dela computadora.
A continuacion vemos la programacion en Visual Basic:

Private Sub Command1_Click()
End
End Sub

Private Sub Label3_Click()
Label2.Caption = "MONITOR"
End Sub

Private Sub Label4_Click()
Label2.Caption = "PARLANTES"
End Sub

Private Sub Label5_Click()
Label2.Caption = "TORRE"
End Sub

Private Sub Label6_Click()
Label2.Caption = "MOUSE"
End Sub

Private Sub Label7_Click()
Label2.Caption = "TECLADO"

End Sub