Programas en Visual Basic 6.0
Control
Propiedad
Valor
Control
Propiedad
Valor
Label1
Caption
Capital
TextBox2
(Nombre)
TpInterés
Label2
Caption
% de InterésText
Label3
Caption
Interés Producido
TextBox3
(Nombre)
InterésPro
Label4
Caption
Capital acumulado
Text
TextBox1
(Nombre)
Capital
TextBox4
(Nombre)
CapitalAc
Text
TextCommandButton1
(Nombre)
Calcular
Form1
(Nombre)
Form1
Caption
Calcular
Caption
Capital e Intereses
(General)
(Declaraciones)
Option Explicit
Private Sub Calcular_Click()
Dimcap As Double, tp As Double
Dim formato As String
formato = "#,###,###,##0.00"
cap = Capital.Text
tp = TpInterés.Text
'Cálculos redondeando resultados
InterésPro.Text =Format(Int(cap * tp / 100 + 0.5), formato)
CapitalAc.Text = Format(cap + InterésPro.Text, formato)
End Sub
Ejercicio 2.- Nombre del Programa: “Conver”
Control
Propiedad
Valor
ControlPropiedad
Valor
Label1
Caption
Grados Centígrados
TextBox1
(Nombre)
Grados_C
Label2
Caption
Grados Fahrenheit
Text
CommandButton1
(Nombre)
Fahrenheit
TextBox2
(Nombre)
Grados_FCaption
Fahrenheit
Text
CommandButton2
(Nombre)
Centígrados
Form1
(Nombre)
Form1
Caption
Centígrados
Caption
Conversión de temperaturas
(General)
(Declaraciones)
OptionExplicit
Private Sub Form_Load()
Grados_C.Text = "0,00"
Grados_F.Text = "32,00"
End Sub
Private Sub Fahrenheit_Click()
Dim GradosFahr As Double
GradosFahr = Grados_C.Text * 9 / 5 + 32Grados_F.Text = Format(GradosFahr, "#,##0.00")
End Sub
Private Sub Centígrados_Click()
Dim GradosCent As Double
GradosCent = (Grados_F.Text - 32) * 5 / 9
Grados_C.Text =Format(GradosCent, "#,##0.00")
End Sub
Ejercicio 3.- Nombre del Programa “InputBox”
Control
Propiedad
Valor
PictureBox1
AutoRedraw
True
Form1
Caption
Entrada/Salida
(General)...
Regístrate para leer el documento completo.