Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti Private Function IsCurrentDayAtPoint(ByVal point As Point) As Boolean '---------------------------------------------------------------------------------------------------- ' GetDayFromPoint ' ' Returns true if the current date is being displayed at the specified coordinates. ' The point is expressed in coordinates relative to the control's client rectangle '---------------------------------------------------------------------------------------------------- ' Use the GetDayFromPoint method to return the Day object ' being displayed at those coordinates, if there is one Dim day As Infragistics.Win.UltraWinSchedule.Day day = Me.ultraMonthViewMulti1.GetDayFromPoint(point) ' If the return value from the GetDayFromPoint method is Nothing, ' there is no day at the specified point, so return false If (Day Is Nothing) Then Return False ' If there was a Day object at the specified point, check ' the Date portion of the corresponding date to see if it is ' the current date if it is, return true If (day.Date.Date = DateTime.Today.Date) Then Return True Return False End Function
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using Infragistics.Win.UltraWinSchedule.MonthViewMulti; private bool IsCurrentDayAtPoint( Point point ) { // Use the GetDayFromPoint method to return the Day object // being displayed at those coordinates, if there is one Infragistics.Win.UltraWinSchedule.Day day = null; day = this.ultraMonthViewMulti1.GetDayFromPoint( point ); // If the return value from the GetDayFromPoint method is null, // there is no day at the specified point, so return false if ( day == null ) return false; // If there was a Day object at the specified point, check // the Date portion of the corresponding date to see if it is // the current date; if it is, return true if ( day.Date.Date == DateTime.Today.Date ) return true; return false; }
UltraMonthViewMulti クラス
UltraMonthViewMulti メンバ
オーバーロード一覧
Day クラス
Infragistics.Win.UIElement.ElementFromPoint(System.Drawing.Point)