Version

GetMonthFromPoint(Point) Method

Syntax
'Declaration
 
Public Overloads Function GetMonthFromPoint( _
   ByVal point As Point _
) As VisibleMonth
public VisibleMonth GetMonthFromPoint( 
   Point point
)

Parameters

point
Location to check

Return Value

A Infragistics.Win.UltraWinSchedule.MonthViewMulti.VisibleMonth object located at the specified point or null (Nothing in VB) if there is no month at the location specified.
Example
Returns true if the current month is being displayed at the specified coordinates. The point is expressed in coordinates relative to the control's client rectangle.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti

    Private Function IsCurrentMonthAtPoint(ByVal point As Point) As Boolean

        '	Use the GetMonthFromPoint method to return the VisibleMonth
        '	at those coordinates, if there is one
        Dim visibleMonth As VisibleMonth
        visibleMonth = Me.ultraMonthViewMulti1.GetMonthFromPoint(Point)

        '	If the return value from the GetMonthFromPoint method is Nothing,
        '	there is no month at the specified point, so return false
        If (visibleMonth Is Nothing) Then
            Return False
        End If

        '	If there was a VisibleMonth, see if it is the current month
        If (visibleMonth.Month.MonthNumber = DateTime.Today.Month And _
          visibleMonth.Month.Year.YearNumber = DateTime.Today.Year) Then
            Return True
        End If

        Return False

    End Function
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.MonthViewMulti;

		private bool IsCurrentMonthAtPoint( Point point )
		{

			//	Use the GetMonthFromPoint method to return the VisibleMonth
			//	at those coordinates, if there is one
			VisibleMonth visibleMonth;
			visibleMonth = this.ultraMonthViewMulti1.GetMonthFromPoint( point );

			//	If the return value from the GetMonthFromPoint method is null,
			//	there is no month at the specified point, so return false
			if ( visibleMonth == null )
				return false;

			//	If there was a VisibleMonth, see if it is the current month
			if ( visibleMonth.Month.MonthNumber == DateTime.Today.Month &&
				 visibleMonth.Month.Year.YearNumber == DateTime.Today.Year )
				return true;

			return false;

		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also