我在VB中实现过,给你一个VB的例子
放一个TEXT,将其属性中的OLEDROPMODE=1
加上这个事件的处理
Private Sub Text1_OLEDragDrop(Data As DataObject,
Effect As Long,
Button As Integer,
Shift As Integer,
X As Single,
Y As Single)
Text1.Text = Data.GetData(vbCFText)‘这里就是得到的URL
End Sub
同样你在DELPHI中引用一个微软的ACTIVEX,比如RICHTEXT,按上述方法即可!
procedure TForm1.MSRichTextBox1OLEDragDrop(Sender: TObject;
var Data: IVBDataObject; var Effect: Integer; var Button,
Shift: Smallint; var x, y: Single);
begin
MSRichTextBox1.Text:= Data.GetData(1);
end;