次の方法で共有


SimpleShape.BackgroundImageChanged イベント

更新 : 2007 年 11 月

図形の BackgroundImage プロパティが変更されると発生します。

名前空間 :  Microsoft.VisualBasic.PowerPacks
アセンブリ :  Microsoft.VisualBasic.PowerPacks.Vs (Microsoft.VisualBasic.PowerPacks.Vs.dll 内)

構文

'宣言
<BrowsableAttribute(True)> _
Public Event BackgroundImageChanged As EventHandler
'使用
Dim instance As SimpleShape
Dim handler As EventHandler

AddHandler instance.BackgroundImageChanged, handler
[BrowsableAttribute(true)]
public event EventHandler BackgroundImageChanged
[BrowsableAttribute(true)]
public:
 event EventHandler^ BackgroundImageChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
JScript では、イベントは使用できません。

解説

このイベントは、プログラムによる変更、またはユーザーとのやり取りのいずれかによって BackgroundImage プロパティが変更された場合に発生します。

イベントの処理方法の詳細については、「イベントの利用」を参照してください。

イベント ハンドラの中で BackgroundImageChanged イベントに応答する方法を次の例に示します。この例では、RectangleShape1 という名前の RectangleShape コントロールおよび Label1 という名前の Label コントロールがフォーム上に配置されている必要があります。

Private Sub RectangleShape1_BackgroundImageChanged(ByVal sender _
 As Object, ByVal e As System.EventArgs) Handles _
 RectangleShape1.BackgroundImageChanged
    ' Display a message in the Label.
    Label1.Text = "The picture has changed."
End Sub
private void rectangleShape1_BackgroundImageChanged(object sender, System.EventArgs e)
{
    // Display a message in the Label.
    label1.Text = "The picture has changed.";
}

アクセス許可

  • 直前の呼び出し元に対する完全な信頼。このメンバは、部分的に信頼されているコードから使用することはできません。詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

SimpleShape クラス

SimpleShape メンバ

Microsoft.VisualBasic.PowerPacks 名前空間

その他の技術情報

ライン コントロールとシェイプ コントロールの概要 (Visual Studio)

方法 : LineShape コントロールを使用して線を描画する (Visual Studio)

方法 : OvalShape コントロールおよび RectangleShape コントロールを使用して図形を描画する (Visual Studio)