ToolStripItem.DoDragDrop 메서드

정의

오버로드

DoDragDrop(Object, DragDropEffects)

끌어서 놓기 작업을 시작합니다.

DoDragDrop(Object, DragDropEffects, Bitmap, Point, Boolean)

끌기 작업을 시작합니다.

DoDragDrop(Object, DragDropEffects)

끌어서 놓기 작업을 시작합니다.

public:
 System::Windows::Forms::DragDropEffects DoDragDrop(System::Object ^ data, System::Windows::Forms::DragDropEffects allowedEffects);
public System.Windows.Forms.DragDropEffects DoDragDrop (object data, System.Windows.Forms.DragDropEffects allowedEffects);
member this.DoDragDrop : obj * System.Windows.Forms.DragDropEffects -> System.Windows.Forms.DragDropEffects
Public Function DoDragDrop (data As Object, allowedEffects As DragDropEffects) As DragDropEffects

매개 변수

data
Object

끌 개체입니다.

allowedEffects
DragDropEffects

발생할 수 있는 끌기 작업입니다.

반환

DragDropEffects 값 중 하나입니다.

설명

끌기 작업을 다른 프로세스에서 애플리케이션과 상호 작용 해야 하는 경우는 data 매개 변수는 관리 되는 기본 클래스 여야 합니다 (같은 System.StringSystem.Drawing.Bitmap, 또는 System.Drawing.Imaging.Metafile)를 구현 하는 개체 System.Runtime.Serialization.ISerializable, 또는 개체 구현 하는 IDataObject합니다.

적용 대상

DoDragDrop(Object, DragDropEffects, Bitmap, Point, Boolean)

끌기 작업을 시작합니다.

public:
 System::Windows::Forms::DragDropEffects DoDragDrop(System::Object ^ data, System::Windows::Forms::DragDropEffects allowedEffects, System::Drawing::Bitmap ^ dragImage, System::Drawing::Point cursorOffset, bool useDefaultDragImage);
public System.Windows.Forms.DragDropEffects DoDragDrop (object data, System.Windows.Forms.DragDropEffects allowedEffects, System.Drawing.Bitmap dragImage, System.Drawing.Point cursorOffset, bool useDefaultDragImage);
public System.Windows.Forms.DragDropEffects DoDragDrop (object data, System.Windows.Forms.DragDropEffects allowedEffects, System.Drawing.Bitmap? dragImage, System.Drawing.Point cursorOffset, bool useDefaultDragImage);
member this.DoDragDrop : obj * System.Windows.Forms.DragDropEffects * System.Drawing.Bitmap * System.Drawing.Point * bool -> System.Windows.Forms.DragDropEffects
Public Function DoDragDrop (data As Object, allowedEffects As DragDropEffects, dragImage As Bitmap, cursorOffset As Point, useDefaultDragImage As Boolean) As DragDropEffects

매개 변수

data
Object
allowedEffects
DragDropEffects
dragImage
Bitmap
cursorOffset
Point
useDefaultDragImage
Boolean

반환

끌어서 놓기 작업 동안 수행된 마지막 효과를 나타내는 DragDropEffects 열거형의 값입니다.

설명

매개 변수는 allowedEffects 발생할 수 있는 끌기 작업을 결정합니다. 끌기 작업이 다른 프로세스 data 에서 애플리케이션과 상호 작용해야 하는 경우 은 기본 관리 클래스(String, Bitmap또는 Metafile)이거나 를 구현하는 일부 Object 여야 합니다 ISerializable. data 은 를 구현하는 모든 Object 항목일 수도 있습니다 IDataObject. dragImage 는 끌기 작업 중에 표시될 비트맵이며 cursorOffset , 왼쪽 위 모서리에서 오프셋인 내에서 dragImage커서의 위치를 지정합니다. useDefaultDragImage 크기가 96x96인 계층화된 창 끌기 이미지를 사용하려면 를 지정하고, 그렇지 않으면 false을 지정 true 합니다. 이미지 너비 또는 높이가 300픽셀을 초과하면 의 dragImage 바깥 가장자리가 혼합됩니다.

DoDragDrop(Object, DragDropEffects, Bitmap, Point, Boolean) 항상 알파 값을 계산할 때 RGB 곱하기 단계를 수행하므로 미리 곱한 알파 혼합 없이 을 항상 전달 Bitmap 해야 합니다. 미리 곱한 알파 혼합을 사용하여 을 Bitmap 전달하면 오류가 발생하지 않지만, 이 메서드는 이를 다시 곱하여 결과 알파 값을 두 배로 곱합니다.

적용 대상