Normas del foro

Curso Hacker
Bienvenido(a), Visitante. Favor de ingresar o registrarse.
¿Perdiste tu email de activación? - Diciembre 02, 2008, 10:32:57
Inicio Ayuda Ingresar Registrarse
Visita: Articulos - Juegos Gratis - Da Foros

Comunidad Underground Hispana  |  Programacion  |  Programación  |  Programación Basica  |  Tema: Ayuda con algoritmo y propiedades 0 Usuarios y 1 Visitante están viendo este tema. « anterior próximo »
Páginas: [1] Ir Abajo Imprimir
Autor Tema: Ayuda con algoritmo y propiedades  (Leído 383 veces)
gh0st
Visitante
« en: Octubre 01, 2003, 12:55:00 »

juegos gratis
Pues tenia algo de tiempo libre y me puse a ver ke me salia, aunke la verdad si me hacia falta algo asi.

es un programa ke te dice cuanto tiempo se va a tardar en descargar cierto archivo segun la conexion que tengas,:

Private Sub cmdDownload_Click()
Dim time56 As Integer
Dim time64 As Integer
Dim time128 As Integer
Dim time256 As Integer
Dim time512 As Integer
Dim timex As Integer
time56 = ((Val(txt_size) * 1024) / 5.6) / 60
lbl_56k.Caption = time56
time64 = ((Val(txt_size) * 1024) / 6.4) / 60
lbl_64k.Caption = time64
time128 = ((Val(txt_size) * 1024) / 12.Cool / 60
lbl_128k.Caption = time128
time256 = ((Val(txt_size) * 1024) / 25.6) / 60
lbl_256k.Caption = time256
time512 = ((Val(txt_size) * 1024) / 51.2) / 60
lbl_512k.Caption = time512
timex = ((Val(txt_size) * 1024) / 102.4) / 60
lbl_xk.Caption = timex
End Sub

aqui nadamas da los minutos, pero me gustaria que se mostraran los resultados en segundos u horas, segun sea el caso, como se podria hacer esto??
En línea
Ragnarok
Visitante
« Respuesta #1 en: Octubre 01, 2003, 01:36:19 »

En línea
srPxM
Visitante


Email
« Respuesta #2 en: Octubre 01, 2003, 05:03:58 »

« Última modificación: Octubre 01, 2003, 05:07:43 por Cid » En línea
zopilote
Visitante


Email
« Respuesta #3 en: Octubre 01, 2003, 08:43:50 »

En línea
ozzferatus
Visitante
« Respuesta #4 en: Octubre 21, 2003, 07:55:42 »

es muy facil, si ya tenes los segundos haces asi
lbl_56k.Caption =dateadd("s",((Val(txt_size) * 1024) / 5.6),"00:00:00")

lo q haces es sumarle los segundos que tenes a la hora cero, entonces te da el tiempo en horas minutos y segundos, facil y sin usar variables.
Espero que te sirva.

En línea
Páginas: [1] Ir Arriba Imprimir 
Comunidad Underground Hispana  |  Programacion  |  Programación  |  Programación Basica  |  Tema: Ayuda con algoritmo y propiedades « anterior próximo »
Ir a:  


Ranking-Hits
Powered by SMF 1.1.7 | SMF © 2006-2007, Simple Machines LLC