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 ' 現在の週に対応する Week オブジェクトを取得します Dim week As Week = Me.ultraCalendarInfo1.GetWeek(DateTime.Today) ' 現在の週の番号を表示します MessageBox.Show("The number of the current week is " + week.WeekNumber.ToString(), "GetWeek", MessageBoxButtons.OK) End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.IO; using System.Globalization; private void button1_Click(object sender, System.EventArgs e) { // 現在の週に対応する Week オブジェクトを取得します Week week = this.ultraCalendarInfo1.GetWeek( DateTime.Today ); // 現在の週の番号を表示します MessageBox.Show( "The number of the current week is " + week.WeekNumber.ToString(), "GetWeek", MessageBoxButtons.OK ); }