ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) ToolStrip.SetItemLocation(ToolStripItem, Point) Method

定義

ToolStripItem 錨定 (Anchor) 至 ToolStrip 上的特定位置。Anchors a ToolStripItem to a particular place on a ToolStrip.

protected public:
 void SetItemLocation(System::Windows::Forms::ToolStripItem ^ item, System::Drawing::Point location);
protected internal void SetItemLocation (System.Windows.Forms.ToolStripItem item, System.Drawing.Point location);
member this.SetItemLocation : System.Windows.Forms.ToolStripItem * System.Drawing.Point -> unit
Protected Friend Sub SetItemLocation (item As ToolStripItem, location As Point)

參數

location
Point Point Point Point

Point,表示 ToolStripItem 位置的 x 和 y 工作區座標 (以像素為單位)。A Point representing the x and y client coordinates of the ToolStripItem location, in pixels.

例外狀況

item 參數的值為 nullThe value of the item parameter is null.

目前的 ToolStrip 不是 item 參數所參考的 ToolStripItem 之擁有人。The current ToolStrip is not the owner of the ToolStripItem referred to by the item parameter.

適用於