ScrollableControl.SetDisplayRectLocation 方法

将显示窗口定位到指定的值。

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

语法

声明
Protected Sub SetDisplayRectLocation ( _
    x As Integer, _
    y As Integer _
)
用法
Dim x As Integer
Dim y As Integer

Me.SetDisplayRectLocation(x, y)
protected void SetDisplayRectLocation (
    int x,
    int y
)
protected:
void SetDisplayRectLocation (
    int x, 
    int y
)
protected void SetDisplayRectLocation (
    int x, 
    int y
)
protected function SetDisplayRectLocation (
    x : int, 
    y : int
)

参数

  • y
    定位 ScrollableControl 的垂直偏移量。

备注

如果 AutoScroll 属性设置为 true,则 DisplayRectangle 属性是 ScrollableControl 的显示工作区的虚拟大小和虚拟位置。调用 SetDisplayRectLocation 方法将 ScrollableControl 滚动到指定位置。

给调用者的说明 SetDisplayRectLocation 不更新滚动条的位置。若要更新滚动条,请调用 AdjustFormScrollbars 方法。

平台

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

请参见

参考

ScrollableControl 类
ScrollableControl 成员
System.Windows.Forms 命名空间
DisplayRectangle
ScrollControlIntoView
Scroll