viernes, 25 de septiembre de 2009
Convertir grados
jueves, 24 de septiembre de 2009
Ascendente y Descendente
Dim arreglo(99) As Integer
Dim I As Integer
Private Sub Command1_Click()
For I = 0 To 99
arreglo(I) = CInt(Rnd(100) * 100)
List1.AddItem arreglo(I)
Next I
End Sub
Private Sub Command2_Click()
List1.Clear
For I = 0 To 99 Step 1
List1.AddItem arreglo(99 - I)
Next I
End Sub
Private Sub Command3_Click()
List1.Clear
For I = 0 To 99
List1.AddItem arreglo(I)
Next I
End Sub
Dim I As Integer
Private Sub Command1_Click()
For I = 0 To 99
arreglo(I) = CInt(Rnd(100) * 100)
List1.AddItem arreglo(I)
Next I
End Sub
Private Sub Command2_Click()
List1.Clear
For I = 0 To 99 Step 1
List1.AddItem arreglo(99 - I)
Next I
End Sub
Private Sub Command3_Click()
List1.Clear
For I = 0 To 99
List1.AddItem arreglo(I)
Next I
End Sub
DÍA_Mes_Año...Progresivamente
Días vividos
Private Sub Calendar1_Click()
Text2.Text = Calendar1
Text3 = Str(CDate(Label1) - CDate(Text2))
End Sub
Private Sub Command1_Click()
Dim item As String
item = UCase(Text1) + Space(5) + Label1 + Space(5) + Str(Calendar1) + Space(5) + Text3
List1.AddItem item
Text1 = ""
Text2 = ""
Text3 = ""
End Sub
Private Sub Form_Load()
Label1.Caption = Date
End Sub
Text2.Text = Calendar1
Text3 = Str(CDate(Label1) - CDate(Text2))
End Sub
Private Sub Command1_Click()
Dim item As String
item = UCase(Text1) + Space(5) + Label1 + Space(5) + Str(Calendar1) + Space(5) + Text3
List1.AddItem item
Text1 = ""
Text2 = ""
Text3 = ""
End Sub
Private Sub Form_Load()
Label1.Caption = Date
End Sub
Arreglo & Promedio
Convertir Minúsculas a Mayúsculas
Calculadora
Dim bsuma, bresta, bmulti, bdivicion As Boolean
Dim divicion As Single
Dim suma, resta, multi, resultado As Integer
Private Sub command1_click()
Text1 = Text1 + Str(1)
End Sub
Private Sub Command10_Click()
Text1 = Text1 + Str(0)
End Sub
Private Sub Command11_Click()
suma = Val(Text1)Text1 = ""
bsuma = True
End Sub
Private Sub Command12_Click()
resta = Val(Text1)Text1 = ""
bresta = True
End Sub
Private Sub Command13_Click()
multi = Val(Text1)Text1 = ""
bmulti = True
End Sub
Private Sub command15_click()
If bsuma = True Then
resultado = resultado + Val(Text1)
suma = suma + Val(Text1)
Text1 = Str(suma)
bsuma = False
End If
If bresta = True Then
resultado = resultado + Val(Text1)
resta = resta - Val(Text1)
Text1 = Str(resta)
bresta = False
End If
If bmulti = True Then
resultado = resultado + Val(Text1)
multi = multi * Val(Text1)
Text1 = Str(multi)
bmulti = False
End If
If bdivicion = True Then
resultado = resultado + Val(Text1)
divicion = divicion / Val(Text1)
Text1 = Str(divicion)
bdivicion = False
End If
End Sub
Private Sub Command16_Click()
Text1 = 0
suma = 0
resta = 0
multi = 0
divicion = 0
End Sub
Private Sub Command2_Click()
Text1 = Text1 + Str(2)
End Sub
Private Sub Command3_Click()
Text1 = Text1 + Str(3)
End Sub
Private Sub Command4_Click()
Text1 = Text1 + Str(4)
End Sub
Private Sub Command5_Click()
Text1 = Text1 + Str(5)End Sub
Private Sub Command6_Click()
Text1 = Text1 + Str(6)
End Sub
Private Sub Command7_Click()
Text1 = Text1 + Str(7)
End Sub
Private Sub Command8_Click()
Text1 = Text1 + Str(8)
End Sub
Private Sub Command9_Click()
Text1 = Text1 + Str(9)
End Sub
Private Sub command14_click()
divicion = Val(Text1)
Text1 = ""
bdivicion = True
End Sub
Dim divicion As Single
Dim suma, resta, multi, resultado As Integer
Private Sub command1_click()
Text1 = Text1 + Str(1)
End Sub
Private Sub Command10_Click()
Text1 = Text1 + Str(0)
End Sub
Private Sub Command11_Click()
suma = Val(Text1)Text1 = ""
bsuma = True
End Sub
Private Sub Command12_Click()
resta = Val(Text1)Text1 = ""
bresta = True
End Sub
Private Sub Command13_Click()
multi = Val(Text1)Text1 = ""
bmulti = True
End Sub
Private Sub command15_click()
If bsuma = True Then
resultado = resultado + Val(Text1)
suma = suma + Val(Text1)
Text1 = Str(suma)
bsuma = False
End If
If bresta = True Then
resultado = resultado + Val(Text1)
resta = resta - Val(Text1)
Text1 = Str(resta)
bresta = False
End If
If bmulti = True Then
resultado = resultado + Val(Text1)
multi = multi * Val(Text1)
Text1 = Str(multi)
bmulti = False
End If
If bdivicion = True Then
resultado = resultado + Val(Text1)
divicion = divicion / Val(Text1)
Text1 = Str(divicion)
bdivicion = False
End If
End Sub
Private Sub Command16_Click()
Text1 = 0
suma = 0
resta = 0
multi = 0
divicion = 0
End Sub
Private Sub Command2_Click()
Text1 = Text1 + Str(2)
End Sub
Private Sub Command3_Click()
Text1 = Text1 + Str(3)
End Sub
Private Sub Command4_Click()
Text1 = Text1 + Str(4)
End Sub
Private Sub Command5_Click()
Text1 = Text1 + Str(5)End Sub
Private Sub Command6_Click()
Text1 = Text1 + Str(6)
End Sub
Private Sub Command7_Click()
Text1 = Text1 + Str(7)
End Sub
Private Sub Command8_Click()
Text1 = Text1 + Str(8)
End Sub
Private Sub Command9_Click()
Text1 = Text1 + Str(9)
End Sub
Private Sub command14_click()
divicion = Val(Text1)
Text1 = ""
bdivicion = True
End Sub
Suma
Suscribirse a:
Comentarios (Atom)
