FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour drop from the URL
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

drop from the URL

Posted: Wed May 29, 2013 07:15 AM

Hello,

I want to receive a drop from the URL in IE in a winforms control. I get no drag enter event. Does anyone know how to do this.

Thanks in advance
Otto

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: drop from the URL

Posted: Wed May 29, 2013 08:41 AM
Otto,

This may help you:


//--------------------------------------------------------------------------------------------------
FUNCTION URLDownLoad(cUrl, cSaveAs)
//--------------------------------------------------------------------------------------------------
sysrefresh()

if !URLDownloadToFile( 0, cUrl, cSaveAs, 0, 0 ) == 0
retu.f.
endif

retu.t.
//--------------------------------------------------------------------------------------------------



DLL32 FUNCTION URLDownloadToFile(pCaller AS LONG,szURL AS STRING, szFileName AS STRING, dwReserved AS LONG, lpfnCB AS LONG) ;
AS LONG PASCAL;
FROM "URLDownloadToFileA";
LIB "urlmon.dll"
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: drop from the URL

Posted: Wed May 29, 2013 09:07 AM

Thank you, Lukas.
But how do I call this function.
Best regards,
Otto

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM

Re: drop from the URL

Posted: Wed May 29, 2013 10:02 AM

Otto,

cUrl := "http://www.sistemasintegrales.es/ficheros/update.exe"

cSaveAs := "c:\temp\update.exe"

URLDownLoad(cUrl, cSaveAs)

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: drop from the URL

Posted: Wed May 29, 2013 02:28 PM
Hello Lukas,
Thank you. But I need a possibility to drag from IE and to get the link in a WINForm.
I post a screen shot to show you what I mean.
Best regards,
Otto

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: drop from the URL

Posted: Wed May 29, 2013 05:18 PM

Otto,

Simply use a RichEdit control instead of that multiline Get and you will automatically get it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion