icarus1
Member
Hi there,
This is my first post in this forum and I am huppy I am a member here. I am old in programming (C, C++, VB6), but very new in VB.NET. These days I am doing my first project using VB.NET and I am learning new things as days pass. My problem is that until now, I am doing things that I can't remember how I did them when the next day comes. It's a chaos....
My problem is that I can't AddDays to a DayTimePicker object.
I need to use two buttons in left and right of a DayTimePicker object. I am doing this as a faster option of increasing or decreasing days.
I have drag-drop a new DateTimePicker in my form and two buttons also:
dtpDate
butInc
butDec
I have also write the subroutines for increasing/decreasing days.
' Increase Days
pivate sub increase_days()
Me.dtpDate.Value.AddDays(1)
End Sub
' Decrease Days
pivate sub increase_days()
Me.dtpDate.Value.AddDays(-1)
End Sub
For example when the button butAdd is clicked it calls the subroutine:
Me.increase_days()
After this nothing changes. The dtpDate.Value remains the same.
What I am doing wrong???
Thank you.
This is my first post in this forum and I am huppy I am a member here. I am old in programming (C, C++, VB6), but very new in VB.NET. These days I am doing my first project using VB.NET and I am learning new things as days pass. My problem is that until now, I am doing things that I can't remember how I did them when the next day comes. It's a chaos....
My problem is that I can't AddDays to a DayTimePicker object.
I need to use two buttons in left and right of a DayTimePicker object. I am doing this as a faster option of increasing or decreasing days.
I have drag-drop a new DateTimePicker in my form and two buttons also:
dtpDate
butInc
butDec
I have also write the subroutines for increasing/decreasing days.
' Increase Days
pivate sub increase_days()
Me.dtpDate.Value.AddDays(1)
End Sub
' Decrease Days
pivate sub increase_days()
Me.dtpDate.Value.AddDays(-1)
End Sub
For example when the button butAdd is clicked it calls the subroutine:
Me.increase_days()
After this nothing changes. The dtpDate.Value remains the same.
What I am doing wrong???
Thank you.