The SkyLight control allows easy integration of QuickTime* for applications developed in Visual Basic, MFC and Access and other development environments which support COM (ActiveX) controls.
Putting a QuickTime movie into your application is now as simple as placing a SkyLight control on your form, calling the QTML_Initialize method to make the connection to QuickTime, and setting the FileName property to load a movie. And remember you can also load pictures - PICT, GIF, BMP, JPEG and sounds - WAV.
Example:
Private Sub Form_Load()
Dim e& e& = SkyLight1.QTML_Initialize If e& <> 0 Then MsgBox "Unable to Initialize QuickTime!" & Chr$(13) & CStr(e&)End Sub
Sub Command1_Click()
SkyLight1.FileName = "c:\windows\sample.mov"
End Sub Private
Sub Form_Unload()
SkyLight1.FileName = "" DoEvents SkyLight1.QTML_TerminateEnd Sub
Two sample applications
are included. Minimal is exactly that, and Demo shows how many
of the methods and properties may be used.
Starts to play a movie from its current position. Equivalent to setting PlayRate = 1.0.
Initializes the connection with QuickTime and returns 0 if successful, or an error code otherwise.
This function need only be called once in your application, for all instances of the SkyLight control. It is normally called in your application initialization code - e.g. in your Form_Load or Main routine - and must be called before any QuickTime related methods and properties of the control are used.
Terminates the connection with QuickTime. Should be called before your application quits. It is good practice to unload all files before calling QTML_Terminate by setting FileName = "" for each control.
Sets the background color of the control whenever a movie or image is not loaded.
Read/Write - Design mode and Run mode.
Sets the color of the single pixel wide border around the control.
Read/Write - Design mode and Run mode.
Determines whether the single pixel wide border around the control is visible.
It is usually a good idea to explicitly set this property before loading a file into the control.
Read/Write - Design mode and Run mode.
Gets the duration of the currently loaded movie in units of the movie TimeScale. Read - Run mode only when a movie is loaded.
Sets the name of a file to load into the control. After setting the FileName property you should check the LastError property, which will be 0 if the file was loaded successfully, or will contain an error code if not. Gets the full path and filename of the currently loaded movie. Read/Write - Run mode only.
Returns the error code from the last action. For example, after setting the FileName property, you can check if the file loaded successfully. Read - Run mode only. Some common error codes are listed below:
-43 File not Found -2048 Invalid file can't be loaded by QuickTime 2093 Unable to load QuickTime -2095 QuickTime not initialized
If Looping = True, the movie or sound will loop continually. If a selection is defined, and PlaySelectionOnly = True, this selection will loop.
Read/Write - Run mode when a movie is loaded. Default = False.
Determines whether the movie controller is visible or not.
It is usually a good idea to explicitly set this property before loading a file into the control.
Read/Write - Run mode. Default = False.
Returns the natural height/width of the movie or image in pixels.
If the movie has no natural width, e.g. a sound-only movie, the width returned will be the default width assigned when the movie was loaded.
Read Only - Run mode when a movie is loaded.
Gets/Sets the horizontal/vertical offset in pixels used to display images.
Read/Write - Run mode when an image is loaded.
Gets/Sets the rate at which the movie plays.
A PlayRate of 1.0 is normal, 0.5 is half-speed, 2.0 is double-speed, etc.
Read/Write - Run mode when a movie is loaded.
If this property is True, then the Play method will only play the selection. A selection may be set using the StartTime and StopTime properties, or may be set manually by holding the Shift key down while moving the progress bar in the movie controller.
Read/Write - Run mode when a movie is loaded. Default = False.
Gets/Sets the physical scale factor which is applied to the movie or image.
For example, to play a movie at double-size, set the ScaleFactor = 2.0.
Read/Write - Design mode and Run mode. Default = 1.
Gets/Sets the start and stop times of the selection. Use to define a selection, which will be played if PlaySelectionOnly = True
Read/Write - Run mode when a movie is loaded.
Gets/Sets the current time position of the currently loaded movie.
Read/Write - Run mode when a movie is loaded.
Returns the TimeScale of the currently loaded movie.
Read Only - Run mode when a movie is loaded.
Occurs whenever the movie controller is moved to a certain position, either manually or by setting the Time property or using the Rewind method.
Occurs whenever the movie starts or stops or changes PlayRate whether caused manually by the movie controller or by using various Properties or Methods.
PlayRate is the new rate at which the movie is playing.
* Properties, Methods and Events not available in the Demo version.
Skylark
Associates Ltd.
The Old Woollen Mill,
CONVOY,
Co. Donegal,
Ireland.
Tel. +353-74-47600
FAX +353-74-47626
Email: john@skylark.ie
© 1998-2002 Skylark Associates Ltd.
Portions of documentation © Apple Computer Inc.
* QuickTime is a registered trademark of Apple Computer Inc.