elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Temas
Páginas: [1]
1  Programación / Programación Visual Basic / Numeros aleatorios en: 3 Noviembre 2007, 11:46 am
Wnas:
Hace tiempo vi un codigo para generar numeros aleatorios, pero ahora no me acuerdo como se hacia... :-X

Alguien sabe como hacerlo o lo tiene x ahi?

Thnx ;D
2  Programación / Programación Visual Basic / Codigo de Potencias en: 4 Octubre 2007, 14:56 pm
HOla, me gustaria sabar si alguien tiene un codigo para calcular potencias.
Thnx! ;) ;D
3  Programación / Programación Visual Basic / Ayuda con el primer .exe!!! Error en el codigo??? en: 25 Septiembre 2007, 19:15 pm
Hola pues eso, es mi primer codigo, cuando le doy a F5 y pruebo el exe me sale error 424.

Aqui os dejo el codigo...

Código:
Public Function CompError() As Integer
If Val(frmIntereses.txtTipo.Text) <= 0 Then
intRespuésta = MsgBox("Escriba un valor para el tipo de interés", vbCritical)
frmIntereses.txtTipo.SetFocus
CompError = 1
Exit Function
End If
If Val(frmIntereses.txtPeríodo.Text) <= 0 Then
intRespuésta = MsgBox("Escriba un valor para el período", bvcritical)
frmIntereses.txtPeíodo.SetFocus
CompError = 1
Exit Function
End If

If Val(frmIntereses.txtInvérsion.Text) <= 0 Then
intRespuésta = MsgBox("Escriba un valor para la inversión", vbCritical)
frmIntereses.txtInversión.SetFocus
CompError = 1
Exit Function
End If
CompError = 0
End Function

Y aki el formulario

Código:
Private Sub Label1_Click()

End Sub

Private Sub cmdCalcular_Click()
Dim sngTipoInt As Single, sngInterés As Single
Dim intPeríodo As Integer, intNúm As Integer
Dim curValInicial As Currency

If CompError() = 1 Then
      Exit Sub
End If

sngTipoInt = txtTipo.Text / 100
intPeríodo = txtPeriodo.Text

curValInicial = txtInversión.Text
sngInterés = 1
For intNúm = 1 To intPeríodo
sngInterés = sngInterés * (1 + sngTipoInt)
Next intNúm
txtFinal.Text = Format(curValInicial * sngInterés, "###.##0,00 €")




End Sub

Private Sub cmdSalir_Click()
Unload fmrIntereses
End
End Sub

PLEASE ayudadme...
Páginas: [1]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines