|
-
Aug 22nd, 2000, 03:54 AM
#1
Thread Starter
Frenzied Member
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.
-
Aug 22nd, 2000, 07:52 PM
#2
Thread Starter
Frenzied Member
What? Nobody knows?
I'm sure someone does!
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Aug 22nd, 2000, 08:17 PM
#3
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
-
Aug 22nd, 2000, 08:32 PM
#4
Thread Starter
Frenzied Member
Ok thanx, i'll try it tomorrow
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Aug 24th, 2000, 08:52 PM
#5
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
-
Aug 25th, 2000, 06:44 AM
#6
Thread Starter
Frenzied Member
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.
-
Aug 25th, 2000, 08:20 AM
#7
Fanatic Member
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!]
-
Aug 25th, 2000, 08:25 PM
#8
Fanatic Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|