SimpleShape.Right 屬性
取得像素為單位,該圖案的右邊緣與其容器工作區左邊的緣之間的距離。
命名空間: Microsoft.VisualBasic.PowerPacks
組件: Microsoft.VisualBasic.PowerPacks.Vs (在 Microsoft.VisualBasic.PowerPacks.Vs.dll 中)
語法
'宣告
<BrowsableAttribute(False)> _
Public ReadOnly Property Right As Integer
[BrowsableAttribute(false)]
public int Right { get; }
[BrowsableAttribute(false)]
public:
property int Right {
int get ();
}
[<BrowsableAttribute(false)>]
member Right : int
function get Right () : int
屬性值
型別:System.Int32
Int32 ,表示像素為單位,該圖案的右邊緣與其容器工作區左邊的緣之間的距離。
備註
Right 屬性的值等於 Left 屬性值和 Width 屬性值的總和。
Right 屬性是唯讀。您可以變更這個屬性值間接變更的值Left或Width屬性或藉由呼叫SetBounds方法。
範例
下列範例會示範如何使用Bottom和Right屬性來定位圖形。這個範例需要有兩個RectangleShape控制項的表單上命名為 RectangleShape1 和 RectangleShape2。
Private Sub RectangleShape1_Click() Handles RectangleShape1.Click
' Set the upper-left corner of Rectangle2
' to the lower-right corner of Rectangle1.
RectangleShape2.Left = RectangleShape1.Right
RectangleShape2.Top = RectangleShape1.Bottom
End Sub
private void rectangleShape1_Click(System.Object sender, System.EventArgs e)
{
// Set the upper-left corner of Rectangle2
// to the lower-right corner of Rectangle1.
rectangleShape2.Left = rectangleShape1.Right;
rectangleShape2.Top = rectangleShape1.Bottom;
}
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。
請參閱
參考
Microsoft.VisualBasic.PowerPacks 命名空間
其他資源
Line 和 Shape 控制項簡介 (Visual Studio)
HOW TO:使用 LineShape 控制項繪製線條 (Visual Studio)
HOW TO:使用 OvalShape 和 RectangleShape 控制項繪製圖案 (Visual Studio)