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;

1 comment:

  1. Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. create free website easily

    ReplyDelete