Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.IO
Imports System.Globalization
PrivateSub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Dim weekNumberFirstDayInMonth AsIntegerDim weekNumberLastDayInMonth AsInteger' 現在の月の最初の日および最終日の週番号を取得します
weekNumberFirstDayInMonth = Me.ultraCalendarInfo1.GetWeekNumberForFirstDayOfMonth(DateTime.Today.Month, DateTime.Today.Year)
weekNumberLastDayInMonth = Me.ultraCalendarInfo1.GetWeekNumberForLastDayOfMonth(DateTime.Today.Month, DateTime.Today.Year)
' 情報をメッセージ ボックスに表示します
Dim info AsString = 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
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.IO;
using System.Globalization;
privatevoid button1_Click(object sender, System.EventArgs e)
{
int weekNumberFirstDayInMonth;
int weekNumberLastDayInMonth;
// 現在の月の最初の日および最終日の週番号を取得します
weekNumberFirstDayInMonth = this.ultraCalendarInfo1.GetWeekNumberForFirstDayOfMonth( DateTime.Today.Month, DateTime.Today.Year );
weekNumberLastDayInMonth = this.ultraCalendarInfo1.GetWeekNumberForLastDayOfMonth( DateTime.Today.Month, DateTime.Today.Year );
// 情報をメッセージ ボックスに表示します
string info = string.Empty;
info += "The week number of the first day in the current month is " + weekNumberFirstDayInMonth.ToString() + "\n";
info += "The week number of the last day in the current month is " + weekNumberLastDayInMonth.ToString() + "\n";
MessageBox.Show( info, "GetWeekNumberForFirstDayOfMonth/GetWeekNumberForLastDayOfMonth", MessageBoxButtons.OK );
}