Control.SetBoundsCore メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Protected Overridable Sub SetBoundsCore ( _ x As Integer, _ y As Integer, _ width As Integer, _ height As Integer, _ specified As BoundsSpecified _ )
Dim x As Integer Dim y As Integer Dim width As Integer Dim height As Integer Dim specified As BoundsSpecified Me.SetBoundsCore(x, y, width, height, specified)
protected virtual void SetBoundsCore ( int x, int y, int width, int height, BoundsSpecified specified )
protected: virtual void SetBoundsCore ( int x, int y, int width, int height, BoundsSpecified specified )
protected function SetBoundsCore ( x : int, y : int, width : int, height : int, specified : BoundsSpecified )

通常、specified パラメータに含まれない境界に対応するパラメータは、現在の値で渡されます。たとえば、Location プロパティの Height または Width、あるいは X または Y の各プロパティは、コントロールの現在のインスタンスに参照渡しできます。ただし、渡されたすべての値は有効で、コントロールに適用されます。
boundsSpecified パラメータは、アプリケーションによって変更された Bounds コントロールの要素を表します。たとえば、コントロールの Size を変更した場合、boundsSpecified パラメータ値は BoundsSpecified の Size 値になります。ただし、設定される Dock プロパティに応じて Size が調整される場合、boundsSpecified パラメータの値は BoundsSpecified の None 値になります。
継承時の注意 派生クラスで SetBoundsCore をオーバーライドする場合は、基本クラスの SetBoundsCore メソッドを呼び出して、強制的にコントロールの境界を変更してください。派生クラスでは、SetBoundsCore メソッドにサイズの制限を追加できます。
SetBoundsCore メソッドをオーバーライドして、コントロールを固定サイズのままにするコード例を次に示します。この例では、Control クラスから直接的または間接的に派生したクラスが存在している必要があります。
Protected Overrides Sub SetBoundsCore(x As Integer, _ y As Integer, width As Integer, _ height As Integer, specified As BoundsSpecified) ' Set a fixed height and width for the control. MyBase.SetBoundsCore(x, y, 150, 75, specified) End Sub
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified) { // Set a fixed height and width for the control. base.SetBoundsCore(x, y, 150, 75, specified); }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からControl.SetBoundsCore メソッドを検索する場合は、下記のリンクをクリックしてください。

- Control.SetBoundsCore メソッドのページへのリンク