Visual Basic - AYUDA CON FECHAS Y HORAS

Life is soft - evento anual de software empresarial
 
Vista:

AYUDA CON FECHAS Y HORAS

Publicado por Gon (24 intervenciones) el 11/06/2001 22:57:16
HOLA QUERIA SABER COMO HAGO PARA QUE ME APAREZCA LA PANTALLA DE HORA Y FECHA DE WINDOWS CUANDO APRETE UN CONTROL COMMAND, YO SE QUE ES EL ARCHIVO C:\WINDOWS\SYSTEM\TIMEDATE.CPL PERO NO LO PUEDO HACER ANDAR, POR FAVOR SI ALGUIEN TIENE LA RESPUESTA SE LO AGRADEZCO, GON

Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
sin imagen de perfil

RE:AYUDA CON FECHAS Y HORAS

Publicado por Iñaki (502 intervenciones) el 12/06/2001 15:53:11
Hola, si unicamente quieres ver la fecha y hora en un formulario (por ejemplo en una label), este codigo te puede valer.
Para ver la fecha :
fecha.caption = format(date,"dd/mm/yyyy")

Para ver la hora, podrias poner time(), sin embargo como necesitas que constantemente se actualize, tienes que meter un control ("TIMER").
En la propiedad "interval" de TIMER, poner el valor 500.
y despues escribes el siguiente codigo.

Private Sub Timer1_timer()
hora.caption=time()
End sub

Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar