DirectShow Animated Header -- Control Properties DirectShow Animated Header -- Control Properties* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: Using the ActiveMovie Control in Visual Basic
*Next Topic: Control Methods

Control Properties


The ActiveMovie Control supports the following properties.
Property Description
AllowChangeDisplayMode Indicates whether or not the end-user can change the display mode at run time between seconds and frames.
AllowHideControls Indicates whether or not the end-user can hide the control panel at run time.
AllowHideDisplay Indicates whether or not the end-user can hide the display panel at run time.
Appearance Specifies the appearance of the display panel's border.
AutoRewind Indicates whether or not the multimedia stream should automatically return to the selection's starting point when it reaches the end of the selection.
AutoStart Indicates whether or not to automatically start playing the multimedia stream.
Balance Specifies the stereo balance.
BorderStyle Specifies the control's border style.
CurrentPosition Specifies the current position within the playback file, in seconds.
CurrentState Specifies the playback file's current state: stopped, paused, or running.
DisplayBackColor Specifies the display panel's background color.
DisplayForeColor Specifies the display panel's foreground color.
DisplayMode Indicates whether or not the display panel shows the current position in seconds or frames.
EnableContextMenu Indicates whether or not to enable the shortcut menu.
Enabled Specifies whether or not the control is enabled.
EnablePositionControls Indicates whether or not to show the position buttons in the controls panel.
EnableSelectionControls Indicates whether or not to show the selection buttons in the controls panel.
EnableTracker Indicates whether or not to show the trackbar control in the controls panel.
FileName Specifies the name of the source data file.
FilterGraph Contains the IUnknown interface pointer to the current filter graph object.
FilterGraphDispatch Contains the IDispatch interface pointer to the current filter graph object.
FullScreenMode Expands the area of the playback panel to fill the entire screen.
MovieWindowSize Specifies the size of the playback panel.
PlayCount Specifies the number of times to play the multimedia stream.
Rate Specifies the playback rate for the stream.
ReadyState Specifies the state of readiness for this ActiveMovie Control, based on how completely the source file has loaded.
SelectionEnd Specifies the ending position in this multimedia stream, in seconds, relative to the stream's beginning.
SelectionStart Specifies the starting position in this multimedia stream, in seconds, relative to the stream's beginning.
ShowControls Indicates whether or not the controls panel is visible.
ShowDisplay Indicates whether or not the display panel is visible.
ShowPositionControls Indicates whether or not the position controls are visible.
ShowSelectionControls Indicates whether or not the selection controls are visible.
ShowTracker Indicates whether or not the trackbar is visible.
Volume Specifies the volume, in hundredths of decibels.

The ActiveMovie Control supports the following properties that are common to other controls: Appearance, BorderStyle, Enabled, and hWnd. For information about these properties, see the documentation for Visual Basic.


AllowChangeDisplayMode Property

Control Properties

Indicates whether or not the end-user can change the display mode at run time between time and frames.

[form.]object.AllowChangeDisplayMode [ = { True | False } ]

Remarks

This property controls run-time access to the DisplayMode property, which specifies whether to show the multimedia file's current position in time or frames. If you set this property to True, the end-user can change how the control displays the current position by right-clicking the control window and choosing Time or Frames from the shortcut menu.

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
True (Default) The end-user can change the type of display at run time.
False The end-user cannot change the type of display at run time.

Data Type

Boolean


AllowHideControls Property

Control Properties

Indicates whether or not the end-user can control the visibility of the controls panel at run time.

[form.]object.AllowHideControls [ = { True | False } ]

Remarks

This property controls run-time access to the ShowControls property, which hides and displays the controls panel. If you set this property to True, the end-user can show or hide the controls panel by right-clicking the control window and choosing Controls from the shortcut menu.

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
True (Default) The end-user can hide or show the controls panel.
False The end-user cannot hide or show the controls panel.

Data Type

Boolean


AllowHideDisplay Property

Control Properties

Indicates whether or not the end-user can hide the display panel at run time.

[form.]object.AllowHideDisplay [ = { True | False } ]

Remarks

This property controls run time access to the ShowDisplay property, which hides and displays the display panel. If you set this property to True, the end-user can show or hide the display panel by right-clicking the control window and choosing Display from the shortcut menu.

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
True (Default) The end-user can hide or show the display panel.
False The end-user cannot hide or show the display panel.

Data Type

Boolean


Appearance Property

Control Properties

Specifies the appearance of the display panel's border.

[form.]object.Appearance [ = long ]

Remarks

This property is identical to the standard Visual Basic Appearance property.

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
1 (Default) The display panel has an inset border, which gives the illusion of depth. This value is the same as 3D.
0 The display panel has no border. This value is the same as Flat.

Data Type

Long


AutoRewind Property

Control Properties

Indicates whether or not the multimedia stream should automatically return to the selection's starting point when it reaches the end of the selection.

[form.]object.AutoRewind [ = { True | False } ]

Remarks

If you set this property to True, DirectShow sets CurrentPosition to the position specified by SelectionStart when it reaches the position specified by SelectionEnd.

To retain the current position within the multimedia stream, set AutoRewind to False or use the Pause method.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) Reposition the multimedia stream to the start of the selection after playback stops.
False Do not reposition the multimedia stream to the start of the selection after playback stops.

Data Type

Boolean

See Also

AutoStart


AutoStart Property

Control Properties

Indicates whether or not to automatically start playing the multimedia stream.

[form.]object.AutoStart [ = { True | False } ]

Remarks

If you set this property to False, you must make an explicit call to the Run method to play the stream.

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
True Automatically start playing the multimedia stream.
False (Default) Do not automatically start the multimedia stream.

Data Type

Boolean

See Also

PlayCount


Balance Property

Control Properties

Specifies the stereo balance.

[form.]object.Balance [ = long ]

Remarks

The value 0 indicates that the sound is balanced equally between the left and right speakers. A value of –10,000 indicates that all sound is going to the left speaker and 10,000 that all sound is going to the right speaker.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
long Numeric expression that specifies the balance value. The number ranges from –10,000 to 10,000 and defaults to 0.

Data Type

Long

See Also

Volume Property


BorderStyle Property

Control Properties

Specifies the control's border style.

[form.]object.BorderStyle [ = long ]

Remarks

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
0 No border.
1 (Default) Fixed, single-line border.

Data Type

Integer (Enumerated)


CurrentPosition Property

Control Properties

Specifies the current position within the multimedia stream, in seconds.

[form.]object.CurrentPosition [ = double ]

Remarks

The new value must be within the range specified by the SelectionStart and SelectionEnd properties.

The current position value displayed by the control's user interface can represent either seconds or frames. The DisplayMode property determines the units shown.

Setting the CurrentPosition property at run time is similar to a seek operation and changes the position to the specified point in the multimedia stream.

Run-time access: read/write. Design-time access: not applicable.

Settings
Setting Description
double New position within the stream, in seconds.

Data Type

double


CurrentState Property

Control Properties

Describes the playback file's current state.

[form.]object.CurrentState

Remarks

You cannot assign a value to this property. You can change it by calling the Stop, Run, or Pause method, and DirectShow notifies the application of the change by sending the StateChange event.

The amv settings are available only to C/C++ programmers; scripters and other programmers should use the numerical values.

Run-time access: read-only. Design-time access: not applicable.

Settings
Setting Value Description
amvStopped 0 The player is stopped.
amvPaused 1 The player is paused.
amvRunning 2 The player is playing the multimedia file.

Data Type

Long


DisplayBackColor Property

Control Properties

Specifies the display panel's background color.

[form.]object.DisplayBackColor [ = color ]

Remarks

At design time, the default setting is black (0x0).

The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF). The high byte of a number in this range equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue components are each represented by a number between 0 and 255 (&HFF). If the high byte is not 0, Visual Basic uses the system colors, as defined in the user's Control Panel settings and by constants listed in the Object Browser's object library.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
Normal RGB colors Colors specified by using the color palette or by using the Visual Basic RGB or QBColor functions in code.
System default colors Colors specified by system color constants listed in the Object Browser's object library. The Windows® operating environment substitutes the user's choices as specified in the Control Panel settings.

See Also

DisplayForeColor


DisplayForeColor Property

Control Properties

Specifies the display panel's foreground color.

[form.]object.DisplayForeColor [ = color ]

Remarks

At design time, the default setting is white (&HFFFFFF).

The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF). The high byte of a number in this range equals 0; the lower 3 bytes, from least to most significant byte, determine the amount of red, green, and blue, respectively. The red, green, and blue components are each represented by a number between 0 and 255 (&HFF). If the high byte is not 0, Visual Basic uses the system colors, as defined in the user's Control Panel settings and by constants listed in the Object Browser's object library.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
Normal RGB colors Colors specified by using the color palette or by using the Visual Basic RGB or QBColor functions in code.
System default colors Colors specified by system color constants listed in the Object Browser's object library. The Windows operating environment substitutes the user's choices as specified in the Control Panel settings.

See Also

DisplayBackColor


DisplayMode Property

Control Properties

Indicates whether the display panel shows the current position in seconds or frames.

[form.]object.DisplayMode [ = setting ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
0 (Default) Display the current position in seconds.
1 Display the current position in frames.

Data Type

Integer (Enumerated)

See Also

AllowHideDisplay, ShowDisplay


EnableContextMenu Property

Control Properties

Indicates whether or not to enable the control's shortcut menu.

[form.]object.EnableContextMenu [ = { True | False } ]

Remarks

The shortcut menu appears when the end-user right-clicks anywhere on the control.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The shortcut menu is enabled.
False The shortcut menu is disabled.

Data Type

Boolean

See Also

ShowDisplay


Enabled Property

Control Properties

Specifies whether or not the control is enabled.

[form.]object.Enabled [ = setting ]

Remarks

This property is identical to the standard Visual Basic Enabled property.

A disabled control remains visible (if it already was) and will continue to play, if it was already playing. When a control is disabled, none of the commands or menus respond to user input.

Disabling a control at design time is useful if you want to control the media stream from an external source, such as a custom group of controls on a Web page, instead of from the built-in controls panel.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
-1 (Default) The control is enabled.
0 The control is disabled.

Data Type

Integer (Enumerated)


EnablePositionControls Property

Control Properties

Indicates whether or not to show the position buttons in the controls panel.

[form.]object.EnablePositionControls [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The position controls are visible.
False The position controls are not visible.

Data Type

Boolean

See Also

ShowPositionControls


EnableSelectionControls Property

Control Properties

Indicates whether or not to show the selection controls in the controls panel.

[form.]object.EnableSelectionControls [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The selection controls are visible.
False The selection controls are not visible.

Data Type

Boolean

See Also

ShowSelectionControls


EnableTracker Property

Control Properties

Indicates whether or not to show the trackbar control.

[form.]object.EnableTracker [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The trackbar is visible.
False The trackbar is not visible.

Data Type

Boolean

See Also

ShowTracker


FileName Property

Control Properties

Specifies the name of the source data file.

[form.]object.FileName [ = string ]

Remarks

The ActiveMovie Control asynchronously opens the file specified by this property at run time. This means that an application must receive the ReadyStateChange event with an amvInteractive or amvComplete value before attempting to call the Run method.

When designing an application using Microsoft® Visual Basic® that uses the ActiveMovie Control, you can choose the media source file at design time. After you add a control to the application, fill in the full path to the media file as the value for the FileName property in Properties. You can also double-click the "..." value in the uninitialized FileName property and its property page will appear. If you click the Browse button, you can pick the desired source file from the Open dialog box.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
string Name of the file that contains the multimedia stream.

Data Type

String


FilterGraph Property

Control Properties

Contains the IUnknown interface pointer to the current filter graph object.

[form.]object.FilterGraph [ = punk ]

Remarks

The filter graph represents a specific configuration of source, transform, and rendering filters. The filter graph is the complete set of software components needed to process a given multimedia stream within the DirectShow architecture.

You can set this property to change the current filter graph.

The IDispatch interface pointer for the filter graph object is contained in the FilterGraphDispatch property.

Run-time access: read/write. Design-time access: read-only.

Settings
Setting Description
punk IUnknown pointer for the filter graph object.

Data Type

Integer (IUnknown*)

See Also

IFilterGraph Interface in the DirectShow SDK documentation.


FilterGraphDispatch Property

Control Properties

Contains an IDispatch interface pointer to the current filter graph object.

[form.]object.FilterGraphDispatch [ = pdisp ]

Remarks

The filter graph represents a specific configuration of source, transform, and rendering filters. The filter graph represents the complete set of software components needed to process a given multimedia stream within the DirectShow architecture.

Run-time access: read-only. Design-time access: read-only.

Settings
Setting Description
pdisp IDispatch pointer to the current filter graph object.

Data Type

Integer (IDispatch*)

See Also

FilterGraph


FullScreenMode Property

Control Properties

Expands the area of the playback panel to fill the entire screen.

[form.]object.FullScreenMode [ = { True | False } ]

Remarks

Run-time access: read-only. Design-time access: read/write.

Settings
Setting Description
True Use full-screen mode.
False Do not use full-screen mode.

Data Type

Boolean

See Also

MovieWindowSize


MovieWindowSize Property

Control Properties

Specifies the size of the playback panel.

[form.]object.MovieWindowSize [ = setting ]

Remarks

The amv settings are available only to C/C++ programmers; scripters and other programmers should use the numerical values.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Value Description
amvOriginalSize 0 (Default) Uses the authored size.
amvDoubleOriginalSize 1 Increases the image projection size to twice the authored size.
amvOneSixteenthScreen 2 Projects the images onto an area the size of one-sixteenth of the screen.
amvOneFourthScreen 3 Projects the images onto an area the size of one-quarter of the screen.
amvOneHalfScreen 4 Projects the images onto an area the size of half of the screen.

Data Type

Long


PlayCount Property

Control Properties

Specifies the number of times to play the multimedia stream.

[form.]object.PlayCount [ = long ]

Remarks

If you set this property to zero, the control will play the multimedia stream repeatedly, restarting as soon as it reaches the end.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
long Numeric expression that specifies the number of times to play the multimedia stream.

Data Type

Long

See Also

AutoStart


Rate Property

Control Properties

Specifies the playback rate for the multimedia stream.

[form.]object.Rate [ = double ]

Remarks

This property acts as a multiplier value that allows you to play the stream at a faster or slower rate. The value 1.0 indicates the authored speed. Note that the audio track becomes difficult to understand at rates lower than 0.5 and higher than 1.5.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
double Numeric expression that represents the playback rate; 1.0 corresponds to the authored rate and is the default value.

Data Type

double


ReadyState Property

Control Properties

Specifies the control's state of readiness.

[form.]object.ReadyState

Remarks

The ActiveMovie Control changes this property at run time, and its value is passed as a parameter to the ReadyStateChange event. The run method will only work on the control after the ReadyState property has reached the amvInteractive or amvComplete state.

Run-time access: read-only. Design-time access: read-only.

Settings
Setting Value Description
amvUninitialized 1 The FileName property has not been initialized.
amvLoading 0 The ActiveMovie Control is asynchronously loading a file.
amvInteractive 3 The control loaded a file, and has downloaded enough data to play the file, but has not yet received all data.
amvComplete 4 All data has been downloaded.

Data Type

Long


SelectionEnd Property

Control Properties

Specifies the ending position in this multimedia stream, in seconds, relative to the stream's beginning.

[form.]object.SelectionEnd [ = double ]

Remarks

The default value for SelectionEnd is the length of the multimedia stream; this value is not accessible until the file is loaded completely. When DirectShow sends the ReadyStateChange event with a value of Complete, you can access the value of this property.

Run-time access: read/write. Design-time access: none.

Settings
Setting Description
double Numeric expression that specifies the position in the multimedia stream that represents the end of the playback sequence.

Data Type

double

See Also

SelectionStart


SelectionStart Property

Control Properties

Specifies the starting position in this multimedia stream, in seconds, relative to the stream's beginning.

[form.]object.SelectionStart [ = double ]

Remarks

The default value for SelectionStart is zero; this value is not accessible until the file is loaded completely. When DirectShow sends the ReadyStateChange event with a value of Complete, you can access the value of this property.

Run-time access: read/write. Design-time access: none.

Settings
Setting Description
double Numeric expression that specifies the position within the multimedia stream that represents the beginning of the playback sequence.

Data Type

double

See Also

SelectionEnd


ShowControls Property

Control Properties

Indicates whether or not the controls panel is visible.

[form.]object.ShowControls [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The controls panel is visible.
False The controls panel is not visible.

Data Type

Boolean

See Also

ShowDisplay


ShowDisplay Property

Control Properties

Indicates whether or not the display panel is visible.

[form.]object.ShowDisplay [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The display panel is visible.
False The display panel is not visible.

Data Type

Boolean

See Also

ShowControls


ShowPositionControls Property

Control Properties

Indicates whether or not the position controls are visible.

[form.]object.ShowPositionControls [ = { True | False } ]

Remarks

The position controls consist of four buttons: Previous, Rewind, Forward, and Next. Rewind and Forward move the media position rapidly backward and forward. If the current media position is after the position specified in SelectionStart, Previous sets the media position to the value of SelectionStart. If not, Previous sets the media position to the start of the data stream. If the current media position is before the position specified in SelectionStart, Next sets the media position to the value of SelectionStart. If not, Next sets the media position to the end of the data stream.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True The position controls are visible.
False (Default) The position controls are not visible.

Data Type

Boolean

See Also

EnablePositionControls


ShowSelectionControls Property

Control Properties

Indicates whether or not the selection controls are visible.

[form.]object.ShowSelectionControls [ = { True | False } ]

Remarks

There are two selection buttons—Start Selection and End Selection. Start Selection sets the SelectionStart property to the current media position and End Selection sets the SelectionEnd property to the current media position. If you choose an invalid selection, such as an end time that is earlier than the start time, DirectShow automatically sets SelectionStart to the start of the data stream and SelectionEnd to the end.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True The selection controls are visible.
False (Default) The selection controls are not visible.

Data Type

Boolean

See Also

EnableSelectionControls


ShowTracker Property

Control Properties

Indicates whether or not the trackbar is visible.

[form.]object.ShowTracker [ = { True | False } ]

Remarks

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
True (Default) The trackbar is visible.
False The trackbar is not visible.

Data Type

Boolean

See Also

EnableTracker


Volume Property

Control Properties

Specifies the volume, in hundredths of decibels.

[form.]object.Volume [ = long ]

Remarks

The value ranges from –10,000 to 0. The value 0 is full volume and –10,000 is no volume. Not all devices support 10,000 discrete steps of volume.

Run-time access: read/write. Design-time access: read/write.

Settings
Setting Description
long Numeric expression that specifies the audio volume, in hundredths of decibels. The default value is zero.

Data Type

Long

See Also

Balance Property

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page