If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

FtpGetGile with DoEvents

I'm using FtpGetFile to retrieve a file on a remote server. Everything works except when the file is downloading, everything on the machine looks like it is frozen; however, it's just downloading the file. Is there a way to download the file in the background and the user can continue to do something else?

Re: FtpGetGile with DoEvents

Hi my nic is centellajs, You most understand when you use a function api for example thi will use the default thread in the form, so you are waiting this reply to you with a handle,so looks like frozen because it depends about internet speed, the sfile size and other, you most undertand like programmer the need to use THREADS, so you can control the fuction , you can use another form so the process will depends on the another form, you cann use just call so the next functions will follow not rplydownloadfile= ftpget so it will wait it has finished how i tell you you can instance another form or function that can control ftpgetfile for example creating a thread :

then when you call the function from the same procedure form or what ever it will freeze all,
hThread = CreateThread(ByVal 0&, ByVal 0&, AddressOf AsyncThread, ByVal 0&, ByVal 0&, hThreadID)
CloseHandle hThread, for example is the same case, so you can call ftpgetfile from another instance .

So it depends about yours skills, don't wait it will exists an ftpgetfile(allparameters PLUS addressoff functioncontrol() ) so the function control would be called back even it is working, you most create this and to pay atention, ftpgetfile just is a function that loops chunks whilest done . anothet thinks is to use socks by clear, but you will find with the same THE THREADS are really important in proramming, you will find with this trouble with a native vb6 timer controls,in many programming language the threads doesn't exists and you most create Them

Re: FtpGetGile with DoEvents

Originally Posted by HanneSThEGreaT

Hi Centellajs, thanks for your enthusiasm; but please remember this thread is 12 years old. By reviving old threads, the forum flow gets messed up.

That is the same i said to my chief boss i gave classes in intelligence system i don't consider a guru maybe yes or not maybe in areas just i know i love, and i fight and i fought in war information countries, many solved problems i checked out in internet for many posts and it doesn't exist, many of my solutions i don't post because could be read by iran country or others, but sometimes when i hear to speak the people ******* about solution honest i feel burning, other countries prefers xD to buy solutions to single companies like KL ND AVst firewalls and they consider me i am crazy jajaja Lol i prefer YES they think this, because if they know what i know,?? No no beter this (y) .

Best Regards-

Last edited by HanneSThEGreaT; August 27th, 2013 at 01:28 AM.
Reason: Removed profanity