Dim Dd As DateDialog
Dim ret As Int
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", "Block Off Date", "Ok", "Cancel", "", Null)
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
Sub btnDate_Click
Dim ret As Int
Dim datitle as String
Dim dadi As DateDialog
dadi.Year=txtyyyy.Text:dadi.Month=txtmm.Text:dadi.DayOfMonth=txtdd.Text
datitle = dadi.DayOfMonth & "/" & dadi.Month & "/" & dadi.Year
ret=dadi.show("Set Date ",datitle,"O K","Cancel","",Null)
End Sub