注: コントロールの GroupingStyle プロパティが 「Merged」 に設定されている場合、このメソッドは適用されず、null (VB では Nothing) を返します。
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub UltraDayView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UltraDayView1.MouseDown Dim ownerAtPoint As Owner = Me.UltraDayView1.GetOwnerFromPoint(New Point(e.X, e.Y)) If Not ownerAtPoint Is Nothing Then MessageBox.Show("The owner at the cursor position is " + ownerAtPoint.Name) Else MessageBox.Show("The cursor is not positioned over an owner.") End If End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; using System.Diagnostics; private void ultraDayView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { Owner ownerAtPoint = this.ultraDayView1.GetOwnerFromPoint( new Point(e.X, e.Y) ); if ( ownerAtPoint != null ) MessageBox.Show( "The owner at the cursor position is " + ownerAtPoint.Name ); else MessageBox.Show( "The cursor is not positioned over an owner." ); }