FTP with Inet Control 
Author Message
 FTP with Inet Control

I'm having trouble with the Inet control for VB5.
When I walk through my code using F8 everything works fine but when I just
run the program it gets stuck in the StillExecuting phase.

Any help would be appreciated
Code snippet below:

    If sCache = "" Then
        sCache = GetRegString(HKEY_CURRENT_USER,
"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",
"Personal")
        sURL = " GET /images/" & Me.PictureFile & " " & sCache & "\" &
Me.PictureFile

        Inet1.Execute "FTP://" & Me.ServerName, sURL
        Do While Inet1.StillExecuting
            Open "c:\mspoperr.log" For Append As #1
                Write #1, Inet1.StillExecuting
            Close #1
        Loop

        Inet1.Cancel

        Me.PictureFile = sCache & "\" & Me.PictureFile
    End If




Wed, 03 Jan 2001 03:00:00 GMT  
 FTP with Inet Control
The main problem here is your not yielding any time within your loop for
async events to occur.  Also you might consider eliminating the log entries
here.  Try this instead:

          Inet1.Execute "FTP://" & Me.ServerName, sURL
          Do While Inet1.StillExecuting
                DoEvents
          Loop

Brad

--
Free ActiveX Controls:
xStrings - Useful string methods and Regular Expressions!
xFtp - Commercial Quality Ftp client control.
Much, much more.
http://pluto.gvn.net/bradley

Quote:

>I'm having trouble with the Inet control for VB5.
>When I walk through my code using F8 everything works fine but when I just
>run the program it gets stuck in the StillExecuting phase.

>Any help would be appreciated
>Code snippet below:

>    If sCache = "" Then
>        sCache = GetRegString(HKEY_CURRENT_USER,
>"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders",
>"Personal")
>        sURL = " GET /images/" & Me.PictureFile & " " & sCache & "\" &
>Me.PictureFile

>        Inet1.Execute "FTP://" & Me.ServerName, sURL
>        Do While Inet1.StillExecuting
>            Open "c:\mspoperr.log" For Append As #1
>                Write #1, Inet1.StillExecuting
>            Close #1
>        Loop

>        Inet1.Cancel

>        Me.PictureFile = sCache & "\" & Me.PictureFile
>    End If





Fri, 05 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. FTP with INET Control

2. ftp via Inet control?

3. FTP with Inet control (VB5)

4. Help with FTP using Inet Control

5. FTP w/Inet control, can not refresh

6. ftp via Inet control?

7. FTP with Inet-Control

8. Cannot access a private Ftp using Inet control

9. FTP with Inet control

10. FTP using INET control

11. FTP on Inet control

12. Inet control and FTP usage questions

 

 
Powered by phpBB® Forum Software