DRAG FILES KE FORM DELPHI
1. unit Unit1; 2. interface 3. uses 4. Windows, Messages, SysUtils, Classes, 5. Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls, jpeg, 6. OleCtrls, SHDocVw; 7. type 8. TForm1 = class(TForm) 9. Image1: TImage; 10. ListBox1: TListBox; 11. WebBrowser1: TWebBrowser; 12. procedure FormCreate(Sender: TObject); 13. private 14. { Private declarations } 15. public 16. { Public declarations } 17. // mendeklarasikan procedure acceptfiles 18. procedure AcceptFiles(var msg: TMessage); 19. message WM_DROPFILES; 20. end; 21. var 22. Form1: TForm1; 23. implementation 24. uses 25. // menginclude shellapi ke program 26. ShellAPI; 27. {$R *.DFM} 28. procedure TForm1.AcceptFiles(var msg: TMessage); 29. const 30. cnMaxFileNameLen = 255; 31. var 32. i, 33. nCount: integer; 34. acFileName: array[0..cnMaxFileNameLen] of char; 35. begin 36. // menghitung jumlah file yang di drag 37. n