MPLATFORMLib Namespace > MItemClass Class : PlaylistBackgroundSet Method |
Public Overridable Sub PlaylistBackgroundSet( _ ByVal _pExternOrRef As Object, _ ByVal _bsPath As String, _ ByVal _bsParam As String, _ ByRef _ppPlaylistItem As MItem _ )
public virtual void PlaylistBackgroundSet( object _pExternOrRef, string _bsPath, string _bsParam, out MItem _ppPlaylistItem )
public procedure PlaylistBackgroundSet( _pExternOrRef: TObject; _bsPath: String; _bsParam: String; Out _ppPlaylistItem: MItem ); virtual;
public: virtual void PlaylistBackgroundSet( IUnknown* _pExternOrRef, BSTR* _bsPath, BSTR* _bsParam, [PARAMFLAG::Out] MItem* _ppPlaylistItem )
Here is example of how to initialize playlist and set a file as its background:
Dim myPlaylist As New MPlaylistClass() myPlaylist.PreviewWindowSet("", panelPreview.Handle.ToInt32()) myPlaylist.PreviewEnable("", 1, 1) myPlaylist.ObjectStart(New Object()) Dim pFile As MItem Dim strPath As String = "d:\clips\SampleClip1.wmv" myPlaylist.PlaylistBackgroundSet(Nothing, strPath, "", pFile) myPlaylist.FilePlayStart()
MPlaylistClass myPlaylist = new MPlaylistClass(); myPlaylist.PreviewWindowSet("", panelPreview.Handle.ToInt32()); myPlaylist.PreviewEnable("", 1, 1); myPlaylist.ObjectStart(new object()); MItem pFile; string strPath = @"d:\clips\SampleBackClip1.wmv"; myPlaylist.PlaylistBackgroundSet(null, strPath, "", out pFile); myPlaylist.FilePlayStart();
var nIndex: integer; pItem: MItem; myPlaylist: MPlaylist; myPreview: IMPreview; myEvents: TEvents; myFile:IMFile; myObject:IMObject; cookie: LONG_PTR; begin myPlaylist:= CreateComObject(CLASS_MPlaylist) as MPlaylist; myPreview:= myPlaylist as IMPreview; myObject:= myPlaylist as IMObject; myEvents:=TEvents.Create(); myObject.ObjectCallbackSet(myEvents, cookie); myFile:=myPlaylist as IMFile; myPreview.PreviewWindowSet('', panelPreview.Handle); myPreview.PreviewEnable('', 1, 1); myPlaylist.PlaylistBackgroundSet(nil, 'c:\myBackFile.avi', '', pItem); myFile.FilePlayStart(); end;