Link to home
Start Free TrialLog in
Avatar of cashisthepower
cashisthepower

asked on

VB6.0 INET Do Events ? (500 POINTS EASY QUESTION EXPERTS )

Hello Experts!

When i click the command2 its start connecting to the ftp and getting  a file , i would like when the download it's done then to MSGBOX " DOWNLOAD IS DONE "

my little source ...
-----------------------
Private Sub Command2_Click()
Inetupload.URL = "ftp://ftp.angelfire.com"
    Inetupload.UserName = "punk/hdc"
    Inetupload.Password = "hackingdigitalcrew"
    Inetupload.Execute , "GET test.exe /info.exe"
''''''' I WANT HERE TO STOP UNTIL THE DOWNLOAD IS FINISHED THEN DO EVENTS "
MSGBOX " DOWNLOAD IS DONE "
End Sub
--------------------------
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Don't wait there.
Just use the inet event:

Option Explicit

Private Sub Command2_Click()
InetUpload.URL = "ftp://ftp.angelfire.com"
    InetUpload.UserName = "punk/hdc"
    InetUpload.Password = "hackingdigitalcrew"
    InetUpload.Execute , "GET test.exe /info.exe"
''''''' I WANT HERE TO STOP UNTIL THE DOWNLOAD IS FINISHED THEN DO EVENTS "
End Sub

Private Sub InetUpload_StateChanged(ByVal State As Integer)
    Debug.Print State
    If State = icResponseReceived Then
        MsgBox " DOWNLOAD IS DONE "
    End If
End Sub
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial