Windows Develop Bookmark and Share   
 index > Windows Forms Designer > DateTimePicker hanging
 

DateTimePicker hanging

Hello All
I place the control on the form. When I clicked the control it hangs..the following is the code

Private Sub dtpStartDt_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dtpStartDt.ValueChanged
Dim dtDate As Date
dtDate = DateAdd(DateInterval.Month, intMonths, dtpStartDt.Value.Date)
lblEndDt.Text = DateAdd(DateInterval.Day, -1, dtDate.Date)
End Sub

System hangs at dtDate = DateAdd(DateInterval.Month, intMonths, dtpStartDt.Value.Date)

Any help?

Thanks

___________________________________________________ Thanks anandnairv - Always learning something...
anandnairv  Wednesday, September 23, 2009 2:24 AM
I think we should use not ValueChanges but TextChanged event of datetime picker. It worked. No idea why it did not work for VaueChanged event..thanks
___________________________________________________ Thanks anandnairv - Always learning something...
  • Marked As Answer byanandnairv Sunday, September 27, 2009 2:47 AM
  •  
anandnairv  Sunday, September 27, 2009 2:47 AM
I think we should use not ValueChanges but TextChanged event of datetime picker. It worked. No idea why it did not work for VaueChanged event..thanks
___________________________________________________ Thanks anandnairv - Always learning something...
  • Marked As Answer byanandnairv Sunday, September 27, 2009 2:47 AM
  •  
anandnairv  Sunday, September 27, 2009 2:47 AM

You can use google to search for other answers

Custom Search

More Threads

• scrollable panels without a scroll bar
• Info pls: Resource File Name property/managed resource compiler tool
• can web user control be placed any where on a webform
• Method 'System.Collections.Generic.List`1[[CUSTOMTYPE]].Add' not found.
• How do you guys work with VS.NET like this? CONTSANT DESIGNER ISSUE??
• Basic Question on Properties returning a class
• Need to resize column
• treeview
• DrawGrid and SnapToGrid
• Creating icons with image editor