|
-
Jul 18th, 2001, 02:24 PM
#1
Thread Starter
Fanatic Member
Doing stuff while URLDownloadToFile is active
I'm sure that this is a dumb question but
URLDownloadToFile seems to take over my app when active and I want my user to be able to enter stuff in Textboxes etc while the download is occuring. How do I do this?
 Looking for a friendly intelligent chat forum? Visit the white-hart.net 
-
Jul 18th, 2001, 02:25 PM
#2
Frenzied Member
I think you would use the DoEvents keyword. I am not too sure on that.
-
Jul 18th, 2001, 02:30 PM
#3
Fanatic Member
DoEvents won't work unless you're in a loop, the first thing that comes to mind is make another application that has only a SubMain routine, and pass in the download arguements as commandline parameters. I've never done anything like that before but its what my little brain thought of first, anyone else have an easier solution?
-
Jul 18th, 2001, 02:31 PM
#4
Thread Starter
Fanatic Member
Originally posted by jjortiz
I think you would use the DoEvents keyword. I am not too sure on that.
I think DoEvents would allow other things to happen at the time of calling but could not be triggered in the middle of a ten minute download - is that right?
Code:
Public Function DownloadFile(URL As String, _
LocalFilename As String) As Boolean
Rem call the DownloadFile function, passing it your URL and local filename. The function will then use the API to download the file and return a True if successful.
Dim lngRetVal As Long
'Screen.MousePointer = 11
GlobalFlag_Downloaded = False
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
Screen.MousePointer = 0
If lngRetVal = 0 Then DownloadFile = True
GlobalFlag_Downloaded = True
End Function
 Looking for a friendly intelligent chat forum? Visit the white-hart.net 
-
Jul 18th, 2001, 04:02 PM
#5
Thread Starter
Fanatic Member
OK if you ever find that you want to do this yourself the MSDN URL is this with the IBindStatusCallback interface.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|