ScrollableControl.SetDisplayRectLocation(Int32, Int32) 方法

定義

將顯示視窗定位至指定的值。

protected:
 void SetDisplayRectLocation(int x, int y);
protected void SetDisplayRectLocation (int x, int y);
member this.SetDisplayRectLocation : int * int -> unit
Protected Sub SetDisplayRectLocation (x As Integer, y As Integer)

參數

x
Int32

要定位 ScrollableControl 的水平位移。

y
Int32

要定位 ScrollableControl 的垂直位移。

備註

AutoScroll如果屬性設定 true 為 ,則 DisplayRectangle 屬性是 的虛擬大小和位置,顯示之 ScrollableControl 的工作區。 SetDisplayRectLocation呼叫 方法,以卷 ScrollableControl 動至指定的位置。

給呼叫者的注意事項

SetDisplayRectLocation(Int32, Int32) 不會更新捲軸的位置。 若要更新捲軸,請呼叫 AdjustFormScrollbars(Boolean) 方法。

適用於

另請參閱