ListBox.GetScaledBounds(Rectangle, SizeF, BoundsSpecified) 方法

定义

检索 ListBox 在其中进行缩放的边界。Retrieves the bounds within which the ListBox is scaled.

protected:
 override System::Drawing::Rectangle GetScaledBounds(System::Drawing::Rectangle bounds, System::Drawing::SizeF factor, System::Windows::Forms::BoundsSpecified specified);
protected override System.Drawing.Rectangle GetScaledBounds (System.Drawing.Rectangle bounds, System.Drawing.SizeF factor, System.Windows.Forms.BoundsSpecified specified);
override this.GetScaledBounds : System.Drawing.Rectangle * System.Drawing.SizeF * System.Windows.Forms.BoundsSpecified -> System.Drawing.Rectangle
Protected Overrides Function GetScaledBounds (bounds As Rectangle, factor As SizeF, specified As BoundsSpecified) As Rectangle

参数

bounds
Rectangle

指定要在显示器边界中检索的区域的 RectangleA Rectangle that specifies the area for which to retrieve the display bounds.

factor
SizeF

控件边界的高度和宽度。The height and width of the control's bounds.

specified
BoundsSpecified

BoundsSpecified 值之一,指定在定义控件大小和位置时要使用的控件边界。One of the values of BoundsSpecified that specifies the bounds of the control to use when defining its size and position.

返回

一个表示控件缩放边界的 RectangleA Rectangle representing the bounds within which the control is scaled.

注解

ListBox 类将重写 Control.GetScaledBounds 方法,以确保缩放请求的高度而不是当前高度。The ListBox class overrides the Control.GetScaledBounds method to ensure that the requested height is scaled rather than the current height.

适用于