Procedure DragDropFiles(Var message: TMessage); Message WM_DropFiles;
Procedure Tfm_main.DragDropFiles(Var message: TMessage);
Var
p: Array[0..254] Of char;
i: word;
Begin
Inherited;
i := DragQueryFile(Message.wParam, $FFFFFFFF, Nil, 0);
For i := 0 To i - 1 Do
Begin
DragQueryFile(Message.wParam, i, p, 255);
End;
Try
If FileExists(strPas(p)) Then
OpenFile(strPas(p));
Finally
DragFinish(HDROP(Message.WParam));
E...[ 查看全文 ]