Lee's C++ Builder Programming Notes
YKLee's Programming Notes on C++ Builder
Thursday, December 25, 2008
Drag-and-Drop
1. 要被拖曳的影像之屬性設定:
DragKind 設定成 dkDrag
DragMode 設定成 dmAutomatic
2. 在 Form 的兩個事件 onDragDrop 與 onDragOver 上的撰寫程式:
onDragDrop 事件:
TImage *buf = (TImage *) Source;
buf->Left = X;
buf->Top = Y;
onDragOver 事件:
Accept = true;
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)