Control.GetStyle メソッドとは? わかりやすく解説

Control.GetStyle メソッド

コントロール指定したコントロール スタイル ビットの値を取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Protected Function GetStyle ( _
    flag As ControlStyles _
) As Boolean
Dim flag As ControlStyles
Dim returnValue As Boolean

returnValue = Me.GetStyle(flag)
protected bool GetStyle (
    ControlStyles flag
)
protected:
bool GetStyle (
    ControlStyles flag
)
protected boolean GetStyle (
    ControlStyles flag
)
protected function GetStyle (
    flag : ControlStyles
) : boolean

パラメータ

flag

値を返す ControlStyles ビット

戻り値
指定したコントロール スタイル ビットtrue設定されている場合trueそれ以外場合false

解説解説
使用例使用例

ダブル バッファリング処理されている Formスタイル ビットの値を返すコード例次に示します。この例では、すべてのスタイル ビットtrue設定されている場合にだけ true返します

Public Function DoubleBufferingEnabled() As
 Boolean
   ' Get the value of the double-buffering style bits.
   Return Me.GetStyle((ControlStyles.DoubleBuffer
 _
     Or ControlStyles.UserPaint _
     Or ControlStyles.AllPaintingInWmPaint))
End Function
public bool DoubleBufferingEnabled()
{
   // Get the value of the double-buffering style bits.
   return this.GetStyle(ControlStyles.DoubleBuffer
 | 
      ControlStyles.UserPaint | 
      ControlStyles.AllPaintingInWmPaint);
}
public:
   bool DoubleBufferingEnabled()
   {
      
      // Get the value of the double-buffering style bits.
      return this->GetStyle( static_cast<ControlStyles>(ControlStyles::DoubleBuffer
 | ControlStyles::UserPaint | ControlStyles::AllPaintingInWmPaint) );
   }
public boolean DoubleBufferingEnabled()
{
    // Get the value of the double-buffering style bits.
    return this.GetStyle(ControlStyles.DoubleBuffer
 | ControlStyles.
        UserPaint | ControlStyles.AllPaintingInWmPaint);
} //DoubleBufferingEnabled
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


このページでは「.NET Framework クラス ライブラリ リファレンス」からControl.GetStyle メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からControl.GetStyle メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からControl.GetStyle メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

Control.GetStyle メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



Control.GetStyle メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS