Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/06/2013, 19:21
KenMasters
 
Fecha de Ingreso: abril-2005
Ubicación: Piura - Perú
Mensajes: 189
Antigüedad: 19 años
Puntos: 0
Respuesta: Programa en visual basic que al iniciar windows pide ingresar la fecha del

Ya mira, el siguiente codigo, solo faltaria a ese codigo colocarle el inicio al arranque de windows, anque eso lo puedes agregar manualmente:

Tienes que agregar el Componente "Microsoft Windows Common Controls-2.6.0 (SP6)"

y agregar 2 Dtpicker y un boton

Código vb:
Ver original
  1. Public Sub SetDate(NewDate As Variant)
  2. On Error Resume Next
  3. DateTime.Date = NewDate
  4. End Sub
  5.  
  6. Public Sub SetTime(NewTime As Variant)
  7. On Error Resume Next
  8. DateTime.Time = NewTime
  9. End Sub
  10.  
  11. Private Sub Command1_Click()
  12.  
  13. 'MsgBox Format(CDate(DTPicker1.Value), "dd/MM/yyyy")
  14. 'MsgBox Format(DTPicker2.Value, "HH:mm:ss")
  15.  
  16. SetDate (Format(CDate(DTPicker1.Value), "dd/MM/yyyy"))
  17. SetTime (Format(DTPicker2.Value, "HH:mm:ss"))
  18.  
  19.  
  20. End Sub
  21.  
  22. Private Sub Form_Load()
  23.     With DTPicker1
  24.         .Format = dtpCustom
  25.         .CustomFormat = "dd/mm/yyyy"
  26.         '.UpDown = True 'Opcional es la forma como quieres que se use el control
  27.        .Value = Now
  28.     End With
  29.     With DTPicker2
  30.         .Format = dtpCustom
  31.         .CustomFormat = "HH:mm:ss"
  32.         .UpDown = True
  33.         .Value = Now
  34.     End With
  35. End Sub

Referencia : http://www.recursosvisualbasic.com.a...l-dtpicker.htm