This documentation is archived and is not being maintained.

ListView.GetItemRect Method (Int32)

Retrieves the bounding rectangle for a specific item within the list view control.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

public Rectangle GetItemRect (
	int index
)
public Rectangle GetItemRect (
	int index
)
public function GetItemRect (
	index : int
) : Rectangle
Not applicable.

Parameters

index

The zero-based index of the item within the ListView.ListViewItemCollection whose bounding rectangle you want to return.

Return Value

A Rectangle that represents the bounding rectangle of the specified ListViewItem.

The bounding rectangle returned by this version of the GetItemRect method represents the entire item, including the icon, item text, and subitem text. To specify a specific portion of the item's bounding rectangle, use the other version of the GetItemRect method.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Show: