Home > Software engineering >  ! Genuflect is begged
! Genuflect is begged

Time:11-17

Now want to make a small program on time, but there is a problem not how will solve: two datetimepicker control is used to set a, said a space between the time, another said he defined time, could you tell me how to solve this problem

CodePudding user response:

Write well, code is as follows:
 
Public Class Form1
Private Sub Timer1_Tick (sender As Object, As EventArgs e) Handles Timer1. Tick
DateTimePicker1. Value=https://bbs.csdn.net/topics/Now
End Sub

Private Sub Form1_Load (sender As Object, As EventArgs e) Handles Me. The Load
DateTimePicker2. Value=https://bbs.csdn.net/topics/#2019-08-05 00:00:00 #

Timer1. Enabled=True

DateTimePicker1. Format=DateTimePickerFormat. Custom
DateTimePicker1. CustomFormat="MM - dd yyyy - HH: MM: ss"

DateTimePicker2. Format=DateTimePickerFormat. Custom
DateTimePicker2. CustomFormat="MM - dd yyyy - HH: MM: ss"
End Sub
The End of the Class

Run the example:

Download address:
Link: https://pan.baidu.com/s/1bk4Tq4LTVAGxMD04AA1smg
The extracted code: fq05

CodePudding user response:

reference 1st floor milaoshu1020 response:
write well, the code is as follows:
 
Public Class Form1
Private Sub Timer1_Tick (sender As Object, As EventArgs e) Handles Timer1. Tick
DateTimePicker1. Value=https://bbs.csdn.net/topics/Now
End Sub

Private Sub Form1_Load (sender As Object, As EventArgs e) Handles Me. The Load
DateTimePicker2. Value=https://bbs.csdn.net/topics/#2019-08-05 00:00:00 #

Timer1. Enabled=True

DateTimePicker1. Format=DateTimePickerFormat. Custom
DateTimePicker1. CustomFormat="MM - dd yyyy - HH: MM: ss"

DateTimePicker2. Format=DateTimePickerFormat. Custom
DateTimePicker2. CustomFormat="MM - dd yyyy - HH: MM: ss"
End Sub
The End of the Class

Run the example:

Download address:
Link: https://pan.baidu.com/s/1bk4Tq4LTVAGxMD04AA1smg
Extract the code: fq05

Thanks brother, really helped me a lot, don't come out I want to be a teacher in kill the well
  • Related