Version

TabFromPoint Method

Returns an MdiTab located at the specified screen coordinates or null, if a tab does not exist at the specified location.
Syntax
'Declaration
 
Public Function TabFromPoint( _
   ByVal point As Point _
) As MdiTab
public MdiTab TabFromPoint( 
   Point point
)

Parameters

point
Location in screen coordinates

Return Value

A MdiTab located at the specified coordinates or null (Nothing in VB)
Remarks

The TabFromPoint method returns the MdiTab that exists at the specified screen coordinates or null (Nothing in VB) if no MdiTab exists at that point.

Example
The following example shows how to use the TabGroupFromPoint and TabFromPoint to retrieve the respective object based on specified screen coordinates.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinTabs
Imports Infragistics.Win.UltraWinTabbedMdi

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
    Dim statusText As String = String.Empty
    Dim pt As Point = Control.MousePosition

    ' The 'TabGroupFromPoint' method takes screen coordinates
    ' so we can pass the coordinates from Control.MousePosition
    ' or Cursor.Position without converting them to client 
    ' coordinates.
    Dim tabGroup As MdiTabGroup = Me.ultraTabbedMdiManager1.TabGroupFromPoint(pt)

    ' if the mouse is not over an area managed by an MdiTabGroup,
    ' the method will return null
    If Not tabGroup Is Nothing Then
        ' if we're over a tab group, we may be over an MdiTab
        ' so use the TabFromPoint with the same screen 
        ' coordinates
        Dim tab As MdiTab = Me.ultraTabbedMdiManager1.TabFromPoint(pt)

        If Not tab Is Nothing Then
            ' if we were over a tab, display the actual
            ' text and tooltip it would display as well
            ' as some info about the tab group
            statusText = String.Format("Tab - ToolTip = {0}, Text = {1}, TabGroup = '{2}'", tab.ToolTipResolved, tab.TextResolved, tabGroup)
        Else
            ' otherwise, just use the tab group
            statusText = String.Format("TabGroup = '{0}'", tabGroup)
        End If
    End If

    If Me.StatusBar1.Text <> statusText Then
        Me.StatusBar1.Text = statusText
    End If
End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinTabs;
using Infragistics.Win.UltraWinTabbedMdi;

private void timer1_Tick(object sender, System.EventArgs e)
{
	string statusText = string.Empty;
	Point pt = Control.MousePosition;

	// The 'TabGroupFromPoint' method takes screen coordinates
	// so we can pass the coordinates from Control.MousePosition
	// or Cursor.Position without converting them to client 
	// coordinates.
	MdiTabGroup tabGroup = this.ultraTabbedMdiManager1.TabGroupFromPoint(pt);

	// if the mouse is not over an area managed by an MdiTabGroup,
	// the method will return null
	if (tabGroup != null)
	{
		// if we're over a tab group, we may be over an MdiTab
		// so use the TabFromPoint with the same screen 
		// coordinates
		MdiTab tab = this.ultraTabbedMdiManager1.TabFromPoint(pt);

		if (tab != null)
		{
			// if we were over a tab, display the actual
			// text and tooltip it would display as well
			// as some info about the tab group
			statusText = string.Format("Tab - ToolTip = {0}, Text = {1}, TabGroup = '{2}'", tab.ToolTipResolved, tab.TextResolved, tabGroup);
		}
		else
		{
			// otherwise, just use the tab group
			statusText = string.Format("TabGroup = '{0}'", tabGroup);
		}
	}

	if (this.statusBar1.Text != statusText)
		this.statusBar1.Text = statusText;
}
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