ListViewItem.GetBounds 方法

为该项检索边框的指定部分。

**命名空间:**System.Windows.Forms
**程序集:**System.Windows.Forms(在 system.windows.forms.dll 中)

语法

声明
Public Function GetBounds ( _
    portion As ItemBoundsPortion _
) As Rectangle
用法
Dim instance As ListViewItem
Dim portion As ItemBoundsPortion
Dim returnValue As Rectangle

returnValue = instance.GetBounds(portion)
public Rectangle GetBounds (
    ItemBoundsPortion portion
)
public:
Rectangle GetBounds (
    ItemBoundsPortion portion
)
public Rectangle GetBounds (
    ItemBoundsPortion portion
)
public function GetBounds (
    portion : ItemBoundsPortion
) : Rectangle

参数

  • portion
    其中一个 ItemBoundsPortion 值,表示要为其检索边框的项的一部分。

返回值

Rectangle,表示该项的指定部分的边框。

备注

GetBounds 方法返回的边框只表示在 portion 参数中指定的项的区域。您也可以调用 ListView 类的 GetItemRect 方法来获取 ListView 控件中任何项的边框。

平台

Windows 98、Windows 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

.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求

版本信息

.NET Framework

受以下版本支持:2.0、1.1、1.0

请参见

参考

ListViewItem 类
ListViewItem 成员
System.Windows.Forms 命名空间
GetItemRect