TextBoxRenderer.IsSupported プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

ユーザーがオペレーティング システムで visual スタイルを有効にしていて、アプリケーション ウィンドウのクライアント領域に visual スタイルが適用される場合は true。それ以外の場合は false。


IsSupported プロパティを使用して、DrawTextBox メソッドを使用するかどうかを判断するコード例を次に示します。このコード例は、TextBoxRenderer クラスのトピックで取り上げているコード例の一部分です。
' Use DrawText with the current TextFormatFlags. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) MyBase.OnPaint(e) If TextBoxRenderer.IsSupported Then TextBoxRenderer.DrawTextBox(e.Graphics, textBorder, Me.Text, _ Me.Font, textRectangle, textFlags, TextBoxState.Normal) Me.Parent.Text = "CustomTextBox Enabled" Else Me.Parent.Text = "CustomTextBox Disabled" End If End Sub
// Use DrawText with the current TextFormatFlags. protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (TextBoxRenderer.IsSupported) { TextBoxRenderer.DrawTextBox(e.Graphics, textBorder, this.Text , this.Font, textRectangle, textFlags, TextBoxState.Normal); this.Parent.Text = "CustomTextBox Enabled"; } else { this.Parent.Text = "CustomTextBox Disabled"; } }
// Use DrawText with the current TextFormatFlags. protected: virtual void OnPaint(PaintEventArgs^ e) override { __super::OnPaint(e); if (TextBoxRenderer::IsSupported) { TextBoxRenderer::DrawTextBox(e->Graphics, textBorder, this->Text , this->Font, textRectangle, textFlags, TextBoxState::Normal); this->Parent->Text = "CustomTextBox Enabled"; } else { this->Parent->Text = "CustomTextBox Disabled"; } }

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に収録されているすべての辞書からTextBoxRenderer.IsSupported プロパティを検索する場合は、下記のリンクをクリックしてください。

- TextBoxRenderer.IsSupported プロパティのページへのリンク