Hi Good People,
I have 7 Textboxes and a DateTimePicker, After Selecting a Date from the (DTP) , I want to put the textboxes in order, of a selected day/Date
At this moment the textboxes on my form run from Friday to Thursday. (Friday being the first day of the week)
So if I select a different day/Date as start of week. I then want to change the textboxes position to the day/date selected to be at the top of the textboxes
Example... I have now is Fri 18/02/2022 selected from the DTPDate.
TxtFri
TxtSat
TxtSun
TxtMon
TxtTue
TxtWed
TxtThu
But If I select, Mon 21/02/2022 from the DTPDate, I then want to change the order of the textboxes to...
TxtMon
TxtTue
TxtWed
TxtThu
TxtFri
TxtSat
TxtSun
Is there a way I can achieve the above.
I have tried writing code for this to no avail, The code I have at the moment is below...
Private Sub GetPostion()
Dim DayFri As Date = DtpDate.Value.Day.ToString("ddd")
Dim DaySat As Date = DtpDate.Value.Day.ToString("ddd")
Dim DaySun As Date = DtpDate.Value.Day.ToString("ddd")
Dim DayMon As Date = DtpDate.Value.Day.ToString("ddd")
Dim DayTue As Date = DtpDate.Value.Day.ToString("ddd")
Dim DayWed As Date = DtpDate.Value.Day.ToString("ddd")
Dim DayThu As Date = DtpDate.Value.Day.ToString("ddd")
If DtpDate.Value.Day = FirstDayOfWeek.Friday Then
Dim X101 As Point = X101
Dim Y29 As Point = Y29
TxtFri.Location = (X101, Y29)
End If
End Sub