02-11-2009, 08:00 PM
كود :
private
{ Déclarations privées }
procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES;
procedure PerformFileOpen(const AFileName: string);
procedure TForm1.PerformFileOpen(const AFileName: string);
begin
flshplyr1.LoadMovie(0, AFileName);
trckbr1.Max:=flshplyr1.TotalFrames;
Form1.Caption:=AFileName;
end;
procedure TForm1.WMDropFiles(var Msg: TWMDropFiles);
var
CFileName: array[0..MAX_PATH] of Char;
begin
try
if DragQueryFile(Msg.Drop, 0, CFileName, MAX_PATH) > 0 then
begin
PerformFileOpen(CFileName);
Msg.Result := 0;
end;
finally
DragFinish(Msg.Drop);
end;
end;
