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

Dim instance As VisualStyleRenderer Dim prop As PointProperty Dim returnValue As Point returnValue = instance.GetPoint(prop)
戻り値
現在の visual スタイル要素の、prop パラメータで指定したプロパティの値を格納している Point。



次のコード例では、カスタム コントロールで GetPoint メソッドを使用して、タイトル バーの右上隅を基準とした [閉じる] ボタンのオフセットを取得する方法を示します。このコード例は VisualStyleRenderer クラスの概要で取り上げているコード例の一部分です。
' Get the sizes and offsets for the window parts as specified ' by the visual style. Private Sub GetPartDetails() ' Do nothing further if visual styles are not enabled. If Not Application.RenderWithVisualStyles Then Return End If Using g As Graphics = Me.CreateGraphics() ' Get the size and offset of the close button. If SetRenderer(windowElements("windowClose")) Then closeButtonSize = _ renderer.GetPartSize(g, ThemeSizeType.True) closeButtonOffset = _ renderer.GetPoint(PointProperty.Offset) End If ' Get the height of the window caption. If SetRenderer(windowElements("windowCaption")) Then captionHeight = renderer.GetPartSize(g, _ ThemeSizeType.True).Height End If ' Get the thickness of the left, bottom, and right ' window frame. If SetRenderer(windowElements("windowLeft")) Then frameThickness = renderer.GetPartSize(g, _ ThemeSizeType.True).Width End If ' Get the size of the resizing gripper. If SetRenderer(windowElements("statusGripper")) Then gripperSize = renderer.GetPartSize(g, _ ThemeSizeType.True) End If End Using End Sub
// Get the sizes and offsets for the window parts as specified // by the visual style. private void GetPartDetails() { // Do nothing further if visual styles are not enabled. if (!Application.RenderWithVisualStyles) { return; } using (Graphics g = this.CreateGraphics()) { // Get the size and offset of the close button. if (SetRenderer(windowElements["windowClose"])) { closeButtonSize = renderer.GetPartSize(g, ThemeSizeType.True); closeButtonOffset = renderer.GetPoint(PointProperty.Offset); } // Get the height of the window caption. if (SetRenderer(windowElements["windowCaption"])) { captionHeight = renderer.GetPartSize(g, ThemeSizeType.True).Height; } // Get the thickness of the left, bottom, // and right window frame. if (SetRenderer(windowElements["windowLeft"])) { frameThickness = renderer.GetPartSize(g, ThemeSizeType.True).Width; } // Get the size of the resizing gripper. if (SetRenderer(windowElements["statusGripper"])) { gripperSize = renderer.GetPartSize(g, ThemeSizeType.True); } } }
// Get the sizes and offsets for the window parts as specified // by the visual style. private: void GetPartDetails() { // Do nothing further if visual styles are not enabled. if (!Application::RenderWithVisualStyles) { return; } Graphics^ g = this->CreateGraphics(); // Get the size and offset of the close button. if (SetRenderer(windowElements["windowClose"])) { closeButtonSize = renderer->GetPartSize(g, ThemeSizeType::True); closeButtonOffset = renderer->GetPoint(PointProperty::Offset); } // Get the height of the window caption. if (SetRenderer(windowElements["windowCaption"])) { captionHeight = renderer->GetPartSize(g, ThemeSizeType::True).Height; } // Get the thickness of the left, bottom, // and right window frame. if (SetRenderer(windowElements["windowLeft"])) { frameThickness = renderer->GetPartSize(g, ThemeSizeType::True).Width; } // Get the size of the resizing gripper. if (SetRenderer(windowElements["statusGripper"])) { gripperSize = renderer->GetPartSize(g, ThemeSizeType::True); } }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


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

- VisualStyleRenderer.GetPoint メソッドのページへのリンク