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

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlPaint.DrawFocusRectangle メソッドの意味・解説 

ControlPaint.DrawFocusRectangle メソッド (Graphics, Rectangle, Color, Color)

フォーカスを示す四角形を、指定したグラフィックス表面指定した範囲内描画ます。

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

解説解説
使用例使用例

DrawFocusRectangle メソッドと Control.Handle プロパティ使用するコード例次に示します。この例を実行するには、次のコードフォーム貼り付けます。そして、Button1 および Button2 という名前の 2 つボタンフォーム追加しすべてのイベントを必ずそれぞれのイベント ハンドラ関連付けます。

' This method draws a focus rectangle on Button2 using the 
' handle and client rectangle of Button2.
Private Sub Button1_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 Button1.Click
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(Button2.Handle), _
    Button2.ClientRectangle)
End Sub
// This method draws a focus rectangle on Button2 using the 
// handle and client rectangle of Button2.
private void Button1_Click(System.Object sender,
 System.EventArgs e)
{
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(Button2.Handle), 
        Button2.ClientRectangle);
}
// This method draws a focus rectangle on Button2 using the 
// handle and client rectangle of Button2.
void Button1_Click( System::Object^ /*sender*/, System::EventArgs^
 /*e*/ )
{
   ControlPaint::DrawFocusRectangle( Graphics::FromHwnd( Button2->Handle ), Button2->ClientRectangle
 );
}
// This method draws a focus rectangle on button2 using the 
// handle and client rectangle of button2.
private void button1_Click(Object sender, System.EventArgs
 e)
{
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(button2.get_Handle()), 
        button2.get_ClientRectangle());
} //button1_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawFocusRectangle メソッド (Graphics, Rectangle)

フォーカスを示す四角形を、指定したグラフィックス表面指定した範囲内描画ます。

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

解説解説
使用例使用例

DrawFocusRectangle メソッドと Control.Handle プロパティ使用するコード例次に示します。この例を実行するには、次のコードフォーム貼り付けます。そして、Button1 および Button2 という名前の 2 つボタンフォーム追加しすべてのイベントを必ずそれぞれのイベント ハンドラ関連付けます。

' This method draws a focus rectangle on Button2 using the 
' handle and client rectangle of Button2.
Private Sub Button1_Click(ByVal
 sender As System.Object, _
    ByVal e As System.EventArgs) Handles
 Button1.Click
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(Button2.Handle), _
    Button2.ClientRectangle)
End Sub
// This method draws a focus rectangle on Button2 using the 
// handle and client rectangle of Button2.
private void Button1_Click(System.Object sender,
 System.EventArgs e)
{
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(Button2.Handle), 
        Button2.ClientRectangle);
}
// This method draws a focus rectangle on Button2 using the 
// handle and client rectangle of Button2.
void Button1_Click( System::Object^ /*sender*/, System::EventArgs^
 /*e*/ )
{
   ControlPaint::DrawFocusRectangle( Graphics::FromHwnd( Button2->Handle ), Button2->ClientRectangle
 );
}
// This method draws a focus rectangle on button2 using the 
// handle and client rectangle of button2.
private void button1_Click(Object sender, System.EventArgs
 e)
{
    ControlPaint.DrawFocusRectangle(Graphics.FromHwnd(button2.get_Handle()), 
        button2.get_ClientRectangle());
} //button1_Click
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ControlPaint.DrawFocusRectangle メソッド




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

辞書ショートカット

すべての辞書の索引

「ControlPaint.DrawFocusRectangle メソッド」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS