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



ControlPaint.DrawFocusRectangle および 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); }

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.Handle プロパティを検索する場合は、下記のリンクをクリックしてください。

- Control.Handle プロパティのページへのリンク