次の方法で共有


Shape.AccessibleName プロパティ

更新 : 2007 年 11 月

ユーザー補助クライアント アプリケーションによって使用される、コントロールの名前を取得または設定します。

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

構文

'宣言
<BrowsableAttribute(True)> _
Public Property AccessibleName As String
'使用
Dim instance As Shape
Dim value As String

value = instance.AccessibleName

instance.AccessibleName = value
[BrowsableAttribute(true)]
public string AccessibleName { get; set; }
[BrowsableAttribute(true)]
public:
property String^ AccessibleName {
    String^ get ();
    void set (String^ value);
}
public function get AccessibleName () : String
public function set AccessibleName (value : String)

プロパティ値

型 : System.String

ユーザー補助クライアント アプリケーションによって使用される、コントロールの名前を表す String。既定値は null 参照 (Visual Basic では Nothing) です。

解説

AccessibleName プロパティは、コンテナ内のオブジェクトを簡潔に説明し、識別するラベルです。たとえば、図形の AccessibleName を "small oval" や "blue square" に設定できます。線の AccessibleName を "vertical line" や "diagonal red line" に設定できます。

ユーザー補助オブジェクトのプロパティの詳細については、MSDN ライブラリの「Active Accessibility」にある「Content of Descriptive Properties」を参照してください。

OvalShape コントロールの AccessibleName プロパティと AccessibleDescription プロパティを設定する方法を次のコード例に示します。ここでは、"cactus" という名前の画像ファイルがリソースとしてプロジェクトに追加されていると仮定します。

Dim OvalShape1 As New OvalShape
Dim canvas As New ShapeContainer
' Set the form as the parent of the ShapeContainer.
canvas.Parent = Me
' Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas
' Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = My.Resources.cactus
OvalShape1.Size = New Size(My.Resources.cactus.Size)
' Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image"
OvalShape1.AccessibleDescription = "A picture of a cactus"
OvalShape OvalShape1 = new OvalShape();
ShapeContainer canvas = new ShapeContainer();
// Set the form as the parent of the ShapeContainer.
canvas.Parent = this;
// Set the ShapeContainer as the parent of the OvalShape.
OvalShape1.Parent = canvas;
// Assign an image resource to the BackgroundImage property.
OvalShape1.BackgroundImage = VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus;
OvalShape1.Size = new Size(VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Height, 
    VbPowerPacksShapeAccessibleCS.Properties.Resources.cactus.Width);
// Assign the AccessibleName and AccessibleDescription text.
OvalShape1.AccessibleName = "Image";
OvalShape1.AccessibleDescription = "A picture of a cactus";

アクセス許可

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

参照

参照

Shape クラス

Shape メンバ

Microsoft.VisualBasic.PowerPacks 名前空間

その他の技術情報

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

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

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