Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim weekNumberFirstDayInMonth As Integer
Dim weekNumberLastDayInMonth As Integer
' 現在の月の最初の日および最終日の週番号を取得します
weekNumberFirstDayInMonth = Me.ultraCalendarInfo1.GetWeekNumberForFirstDayOfMonth(DateTime.Today.Month, DateTime.Today.Year)
weekNumberLastDayInMonth = Me.ultraCalendarInfo1.GetWeekNumberForLastDayOfMonth(DateTime.Today.Month, DateTime.Today.Year)
' 情報をメッセージ ボックスに表示します
Dim info As String = String.Empty
info += "The week number of the first day in the current month is " + weekNumberFirstDayInMonth.ToString() + vbCrLf
info += "The week number of the last day in the current month is " + weekNumberLastDayInMonth.ToString() + vbCrLf
MessageBox.Show(info, "GetWeekNumberForFirstDayOfMonth/GetWeekNumberForLastDayOfMonth", MessageBoxButtons.OK)
End Sub