Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.CalendarCombo
Private Sub SetLongDateFormat()
' If the DateTimeFormatInfo property is set, prompt the user
If (Not Me.ultraCalendarCombo1.DateTimeFormatInfo Is Nothing) Then
Dim info As String = String.Empty
info += "A custom DateTimeFormat has been specified for the control." + vbCrLf
info += "Do you still want to apply the current culture's LongDatePattern?"
Dim result As DialogResult = MessageBox.Show(info, "SetLongDateFormat", MessageBoxButtons.OK)
If (result = DialogResult.No) Then Return
End If
' Get the current culture's LongDatePattern
Dim longDate As String = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern
' Set the control's Format property to the long date format string
Me.ultraCalendarCombo1.Format = longDate
End Sub