VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 14

Stopping the Download With the CancelAsyncRead Method

While waiting for your download to complete, perhaps the user has become tired or moved on to other tasks or perhaps you've defined a timeout interval that has just passed. In such cases, your code may call the CancelAsyncRead method to stop a pending asynchronous download.

In order to call this method, you must have specified the optional PropertyName parameter as mentioned in the previous session. With a PropertyName identifier (even though your download might not be intended for a property), you can identify which download you want to cancel.

Assuming that you'd like to cancel the "PRETTYPIX" download that you began in the previous section's example, you'd write a line of code like this:

UserDocument.CancelAsyncRead "PRETTYPIX"


<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved