![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!
The Errorcode argument will be zero if the operation completed without an error. It will be set to a non-zero value if the operation did not complete successfully. When an error is detected, you can use the Error and ErrorMessage properties (discussed soon) to determine the nature of the error. The Done event procedure is executed when an MCI command finishes executing. This event procedure is not automatically executed, but rather, is controlled by the Multimedia controls Notify property. Notify is normally False, which means that the Done event will not be triggered. If you set Notify to True, however, the Done event will be triggered at the completion of the next MCI command executed. This is true both for MCI commands that result from clicking on one of the control buttons and for commands executed by means of the controls Command property. The Done event procedure is passed a type Integer argument named NotifyCode. The value in this argument indicates the result of the MCI operation that just completed. This value is the same as that in the NotifyValue property, as shown in Table 16.7. Remember that setting Notify to True affects only the next MCI command to be issuednot any subsequent commands or the command currently being executed (if any). You must set Notify to True before each and every MCI command for which you want the Done event procedure triggered. Perhaps you have already seen how the Done event and the ButtonCompleted event make it possible for us to detect when the command has completed executingsomething done with a callback function when sending commands directly to the MCI. By knowing when the play operation is complete, you can close the device or perform whatever other actions you need to take. The StatusUpdate event occurs each time the Multimedia control checks the status of the device associated with it. The interval at which this checking occurs is specified by the UpdateInterval property. The default value of 1,000 milliseconds results in status checks every second. Code in the StatusUpdate event procedure can be used to provide the user with information about the current operation, obtained from Multimedia control properties, such as Mode, Length, and Position.
|
![]() |
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |