📅  最后修改于: 2022-03-11 14:51:56.944000             🧑  作者: Mango
'TextBox1 is where the user inputs the number of minutes
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
Dim d = TimeSpan.FromMinutes(TextBox1.Text) 'creates a TimeSpan based on user input, this is also a variable creation
TextBox5.Text = d.ToString("dd\:hh\:mm") 'you can format it with a custom format
'Or you can access the elements of the TimeSpan like so
TextBox2.Text = d.Days
TextBox3.Text = d.Hours
TextBox4.Text = d.Minutes
End Sub