ParentControlDesigner.OnMouseDragBegin(Int32, Int32) 方法

定義

呼叫以回應在元件上按住滑鼠左鍵。

C#
protected override void OnMouseDragBegin(int x, int y);

參數

x
Int32

螢幕座標中滑鼠的 X 座標。

y
Int32

螢幕座標中滑鼠的 Y 座標。

備註

呼叫這個方法,以響應元件上按下的滑鼠左鍵。 設計工具會覆寫這個方法的基底形式,為控件內的元件提供「套索」選取機制。

備註

您可以將螢幕座標中的點傳遞至 PointToClient 類別的 Control 方法,以取得相對於控件左上角的點座標。

適用於

產品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

另請參閱