Dim Dd As DateDialog
Dim ret As Int
Dim strDate As String
Dd.Year = DateTime.GetYear(DateTime.now) 'set the display year
Dd.Month = DateTime.GetMonth(DateTime.now) 'set the display month
Dd.DayOfMonth = DateTime.GetDayOfMonth(DateTime.now) 'set the display day
ret = Dd.Show("Set the required date", "Date Selection".ToUpperCase, "Ok", "Cancel", "", Null)
If ret=-1 Then
strDate= DateTime.Date(Dd.DateTicks)
Msgbox(strDate,"")
End If