Results 1 to 8 of 8

Thread: Stopping Inet.Activity

  1. #1

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    How do I stop all internet activity (ITC, the Microsoft Internet Control) so that I can quit my program at any time without crashing.

    I now use Inet1.Cancel In the Form_Unload, Form_Terminate and Form_QueryUnload

    but it seems to wait before closing.

    I think it's not good to just put an END after inet.cancel, will it crash the prog, make the system unstable?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  2. #2

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    What? Nobody knows?

    I'm sure someone does!
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Guest
    I don't think there is a way to do it. Maybe this will work:

    Code:
    Inet1.Cancel
    ' Not sure if a Set Form1 = Nothing goes here
    Unload Me
    Set Form1 = Nothing
    End
    MSInet says that Cancel stops the process..from what I see, doesn't stop sh**!!

    I tested it with Inet1.OpenURL("http://www.vb-world.net") and I put that code in the Unload event, and it just keeps crashing. But than I used the first Set Form1 = Nothing, kept the second there as well and all VB did was wait till the task was finished and then unloaded. Looks like your going to have to disable the Exit Button, or put something like:

    Code:
    If Inet1.StillExecuting = True Then
    Exit Sub
    Else
    Unload Me
    Set form1 = Nothing
    End
    End If

  4. #4

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Ok thanx, i'll try it tomorrow
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5
    Guest
    You could also keep trying to cancel it.

    Code:
    Do
    Inet1.Cancel
    DoEvents
    Loop While Inet1.StillExecuting = True
    Or this way:

    Code:
    Do Until Inet1.StillExecuting = False
    Inet1.Cancel
    DoEvents
    Loop

  6. #6

    Thread Starter
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    What's the best way to do it do you think?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  7. #7
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    No Matter What you are going to have problems cancelling the Inet control.

    Its IE right!?

    ever try to stop a FTP transfer in IE... same thing... if microsoft can't their own control to work in their browser I doubt we can. Not saying that microsoft is great, just that its their control!
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  8. #8
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    You cannot stop IE when you hit stop.

    you can during HTTP and sometimes during FTP

    But if for example a server is running very slow during the log in or file transfer you will NOT be able to stop it.

    do this type

    ftp://e.com

    and then try to press STOP
    Kurt Simons
    [I know I'm a hack but my clients don't!]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width