Windows Media Player Control SDK Banner Art
*Contents *Index  *Topic Contents
*Previous Topic: ErrorDescription
*Next Topic: FramesPerSecond

FileName Property

Sets or retrieves a value specifying the name of the clip to play.

Syntax

MediaPlayer.FileName [ = "sName" ]

Possible Values

sName String value specifying the name of the clip. The default value is an empty string ("").
This property is read/write.

Remarks

If the value of the AutoStart property is true, file playback begins automatically whenever you set the FileName property. If you set both AutoStart and FileName at design time, the Microsoft® Windows Media™ Player control begins playing the file when it is loaded.

Setting this property is a synchronous operation: Control does not return to the application until after the file has completed the open process. The Open method performs the same operation asynchronously.

To use compact disc audio with your CD-ROM drive as input to the Windows Media Player control, set this property to cdaudio: (with the trailing ":"). For more information, see Compact Disc Audio Playback.

To use digital video disc (DVD) as input, set this property to dvd: (with the trailing ":"). For more information, see Viewing DVD in a Web Page.

See Also

Open method, AutoStart property, Playback Methods and Properties, Processing Embedded Script Commands


Top of Page Top of Page
© 1999 Microsoft and/or its suppliers. All rights reserved. Terms of Use.