VFP ·R¥ÎªÌªÀ°Ï ­º­¶ VFP ·R¥ÎªÌªÀ°Ï
¥»°Q½×°Ï¬° Visual Foxpro ·R¥ÎªÌ¸gÅç¥æ¬yªº¦a¤è, ½Ð¦h¦h§Q¥Î"·j´M"ªº¥\¯à, ¥ý¬d¬Ý¬Ý¦³µL«e¨Ò¥i´`, ¦pªGÁÙ¦³¤£À´ªº¦Aµo°Ý. ³¡¥÷¥DÃD¦³ªþ¥[ÀÉ®×, ¶·¥ýµù¥U¦¨¬°ªÀ°Ï©~¥Á¤~¥i¥H¤U¸ü.
 
 ±`¨£°ÝÃD±`¨£°ÝÃD   ·j´M·j´M   ·|­û¦Cªí·|­û¦Cªí   ·|­û¸s²Õ·|­û¸s²Õ   ·|­ûµù¥U·|­ûµù¥U 
 ­Ó¤H¸ê®Æ­Ó¤H¸ê®Æ   µn¤JÀˬd±zªº¨p¤H°T®§µn¤JÀˬd±zªº¨p¤H°T®§   µn¤Jµn¤J

VFP¼½©ñ¼v¤ùµ{¦¡( ±±¨î WMPlayer.OCX )

 
µoªí·s¥DÃD   ¦^ÂÐ¥DÃD    VFP ·R¥ÎªÌªÀ°Ï ­º­¶ -> VFP °Q½×°Ï
¤W¤@½g¥DÃD :: ¤U¤@½g¥DÃD  
µoªí¤H ¤º®e
garfield
Site Admin


µù¥U®É¶¡: 2003-01-30
¤å³¹: 2157


²Ä 1 ¼Ó

µoªíµoªí©ó: ¬P´Á¤@ ¤T¤ë 21, 2016 6:29 pm    ¤å³¹¥DÃD: VFP¼½©ñ¼v¤ùµ{¦¡( ±±¨î WMPlayer.OCX ) ¤Þ¨¥¦^ÂÐ

µ{¦¡­ì©l½X¨Ó·½:
http://yousfi.over-blog.com/2015/03/playing-with-windows-mediaplayer.html

¥N½X:

Clea All

Sys(2002)   &&hide the cursor
Publi yform
yform=Newobject("asup")
yform.Show
Read Events
Return
*
Define Class asup As Form
    BorderStyle = 2
    Height = 600
    Width = 630
    ShowWindow = 2
    AutoCenter = .T.
    Caption = "yMediaplayer"
    MaxButton = .F.
    BackColor = Rgb(0,0,0)
    ymedia = .F.
    Name = "Form1"

    Add Object timer1 As Timer With ;
        Top = 500, ;
        Left = 396, ;
        Height = 23, ;
        Width = 23, ;
        Enabled = .F., ;
        Interval = 1000, ;
        Name = "Timer1"

    Add Object ycont1 As ycont1 With ;
        Top = 508, ;
        Left = 48, ;
        Width = 336, ;
        Height = 18, ;
        BackStyle = 0, ;
        BorderWidth = 0, ;
        Name = "ycont1"

    Add Object container1 As container1 With ;
        Top = 536, ;
        Left = 48, ;
        Width = 432, ;
        Height = 22, ;
        BackStyle = 1, ;
        BorderWidth = 2, ;
        BackColor = Rgb(0,0,0), ;
        BorderColor = Rgb(255,255,255), ;
        Name = "Container1"

    Add Object wmp As OleControl With ;
        oleclass="WMPlayer.OCX.7",;
        Top = 3, ;
        Left = -21, ;
        Height = 480, ;
        Width = 640, ;
        UiMode="none",;
        Stretchtofit=.T.,;
        enableContextMenu=.F.,;
        Name = "WMP"

    Add Object text1 As TextBox With ;
        BackStyle = 1, ;
        Value = "Info", ;
        Height = 25, ;
        Left = 48, ;
        MousePointer = 15, ;
        Top = 564, ;
        Width = 36, ;
        ForeColor = Rgb(255,255,255), ;
        BackColor = Rgb(0,0,0), ;
        Name = "Text1"

    Add Object yvol As yvol With ;
        Top = 504, ;
        Left = 554, ;
        Width = 56, ;
        Height = 30, ;
        BackStyle = 0, ;
        BorderWidth = 0, ;
        ToolTipText = "Volume", ;
        Name = "yvol"

    Add Object container2 As container2 With ;
        Top = 564, ;
        Left = 201, ;
        Width = 220, ;
        Height = 28, ;
        BackStyle = 0, ;
        Name = "Container2"


    Procedure my

        Lparameters nButton, nShift, nXCoord, nYCoord
        *--- aevent create an array laEvents
        Aevents( myArray, 0)
        *--- reference the calling object
        loObject = myArray[1]
        aa=Allt(loObject.Name)
        x=Val(Substr(aa,6,1))
        For i=1 To x
            aa="this.yvol.shape"+;
Trans(i)+".backcolor"
            &aa=255
        Endfor

        If x<6
            For i=x+1 To 7
   aa="this.yvol.shape"+;
Trans(i)+   ".backcolor"

                &aa=Rgb(128,128,128)
            Endfor
        Endi
        vol=0
        Do Case
            Case x=1
                Thisform.wmp.settings.Volume=0
            Case x=2
                Thisform.wmp.settings.Volume=10
            Case x=3
                Thisform.wmp.settings.Volume=40
            Case x=4
                Thisform.wmp.settings.Volume=60
            Case x=5
                Thisform.wmp.settings.Volume=80
            Case x=6
                Thisform.wmp.settings.Volume=90
            Case x=7
                Thisform.wmp.settings.Volume=100
        Endcase
    Endproc

    Procedure Destroy

erase  (Addbs(Sys(2023))+"ywmp.html")
        Clea Events
    Endproc


    Procedure Init
        Thisform.ShowTips=.T.
        For i=1 To 7
    aa="this.yvol.shape"+;
Trans(i)

            Bindevent(&aa,"mousedown",This,"my")
        Endfor
        Thisform.timer1.Enabled=.F.
    Endproc

    Procedure timer1.Timer
        yevent=""
        Try
            x=Thisform.wmp.playstate

            Do Case
                Case x=0
                    yevent= "Undefined"
                Case x=1
                    yevent= "Stopped"
                Case x=2
                    yevent= "Paused"
                Case x=3
                    yevent= "Playing"
                Case x=4
                    yevent= "ScanForward" &&Avance rapide
                Case x=5
                    yevent= "ScanReverse" &&Retour rapide
                Case x=6
                    yevent= "Buffering"
                Case x=7
                    yevent= "Waiting"
                Case x=8
                    yevent= "MediaEnded"
                Case x=9
                    yevent= "Transitioning" &&Préparation nouvelle séquence
                Case x=10
                    yevent= "Ready"
                Case x=11
                    yevent= "Reconnecting"
            Endcase
        Catch
        Endtry

        Try
            t1=Thisform.wmp.Controls.currentpositionString
            t2=Thisform.wmp.currentmedia.durationString
            Thisform.container1.ylab.Caption=yevent+"..."+Allt(Thisform.ymedia)+"   "+t1+"  -  Duration: "+t2
            Thisform.container1.ylab.Left=Thisform.container1.ylab.Left-20
        Catch
        Endtry

        If Thisform.container1.ylab.Left<=-Thisform.container1.ylab.Width/2
            Thisform.container1.ylab.Left=0.9*Thisform.container1.Width
        Endi

        dur=Thisform.wmp.currentmedia.duration
        dur1=Thisform.wmp.Controls.currentposition

        With Thisform.ycont1
            If dur1>0
                .label1.Width=(dur1/dur)*Thisform.ycont1.Width
            Endi
            .shape1.Left=.label1.Width -.shape1.Width/2
            .shape1.Top=.label1.Top+.label1.Height/2-.shape1.Height/2

            If .label1.Width=.Width
                This.Enabled=.F.
            Endi
        Endwith



        *msdn
        *Value    State    Description
        *0    Undefined    Windows Media Player is in an undefined state.
        *1    Stopped    Playback of the current media item is stopped.
        *2    Paused    Playback of the current media item is paused. When a media item is paused, resuming playback begins from the same location.
        *3    Playing    The current media item is playing.
        *4    ScanForward    The current media item is fast forwarding.
        *5    ScanReverse    The current media item is fast rewinding.
        *6    Buffering    The current media item is getting additional data from the server.
        *7    Waiting    Connection is established, but the server is not sending data. Waiting for session to begin.*
        *8    MediaEnded    Media item has completed playback.
        *9    Transitioning    Preparing new media item.
        *10    Ready    Ready to begin playing.
        *11    Reconnecting    Reconnecting to stream.
    Endproc

    Procedure wmp.OPENSTATECHANGE
        Lparameters newstate
        Try
            This.Resize()
        Catch
        Endtry
    Endproc

    Procedure wmp.PLAYSTATECHANGE
        Lparameters newstate
        Try
            This.Resize()
        Catch
        Endtry
    Endproc

    Procedure wmp.STATUSCHANGE
        Try
            This.Resize()
        Catch
        Endtry
    Endproc


    Procedure wmp.PLAYLISTCHANGE
            Lparameters playlist, Change
        Try
            This.Resize()
        Catch
        Endtry
    Endproc

    Procedure wmp.MEDIACHANGE
        Lparameters Item       &&object
        *messagebox(item.sourceUrl)
        Try
            This.Resize()
        Catch
        Endtry


        If Vartype(Item)="O"
            Thisform.ymedia=Item.Name
        Else
            Thisform.ymedia=""
        Endi

        x=""
        cr=Chr(13)
        With Item
            x=x+"Name:"+.getItemInfo("Name")+cr
            x=x+"Author:"+.getItemInfo("author")+cr
            x=x+"Tile:"+.getItemInfo("Title")+cr
            x=x+"Album:"+.getItemInfo("Album")+cr
            x=x+"CopyRight:"+.getItemInfo("copyright")+cr
            x=x+"Artist:"+.getItemInfo("Artist")+cr
            x=x+"Genre:"+.getItemInfo("Genre")+cr
            *x=x+trans(.getItemInfo("Bitrate") / 1000)+ " kbps"+cr
            x=x+"Abstract:"+.getItemInfo("Abstract")+cr
            x=x+"Bitrate:"+Trans(.getItemInfo("bitRate"))+cr
            *x=x+"Duration:"+trans(.getItemInfo("duration"))+" sec."+cr
            x=x+"Duration hh-mm-ss:"+(Thisform.wmp.currentmedia.durationString)+cr

        Endwith
        Thisform.text1.ToolTipText=x
    Endproc


    Procedure wmp.MODECHANGE
         Lparameters modename, newvalue
        Try
            This.Resize()
        Catch
        Endtry
    Endproc

    Procedure wmp.Resize
        Try
            Thisform.LockScreen=.T.
            With This
                .Top=0
                .Left=0
                .Width=640
                .Height=480
                .UiMode="none"

            Endwith
            Thisform.LockScreen=.F.
        Catch
        Endtry
    Endproc

    Procedure wmp.Init
        With This
            .settings.autoStart = .F.
            .settings.Volume=100
            .settings.mute=.F.
            .Stretchtofit=.T.
            .enableContextMenu=.F.
            .settings.setMode('shuffle',.F.)     &&random reading playlist
            .settings.setMode('loop',.T.)    &&loop
            .UiMode="none"
            DoEvents
            .Visible=.T.
        Endwith
        This.Resize()
    Endproc

    Procedure wmp.Moved
        Try
            This.Resize()
        Catch
        Endtry
    Endproc

    Procedure yvol.Init
        This.SetAll("mousepointer",15,"shape")
    Endproc

Enddefine
*
*-- EndDefine: asup
 

*container1
Define Class container1 As Container
    Top = 536
    Left = 48
    Width = 432
    Height = 22
    BackStyle = 1
    BorderWidth = 2
    BackColor = Rgb(0,0,0)
    BorderColor = Rgb(255,255,255)
    Name = "Container1"

    Add Object ylab As Label With ;
        AutoSize = .T., ;
        FontSize = 8, ;
        BackStyle = 0, ;
        Caption = "", ;
        Height = 16, ;
        Left = 345, ;
        Top = 2, ;
        Width = 2, ;
        ForeColor = Rgb(255,255,255), ;
        BackColor = Rgb(0,0,0), ;
        Name = "ylab"
Enddefine
*
*-- EndDefine: container1
 


*yvol
Define Class yvol As Container
    Top = 504
    Left = 554
    Width = 56
    Height = 30
    BackStyle = 0
    BorderWidth = 0
    ToolTipText = "Volume"
    Name = "yvol"

    Add Object shape1 As Shape With ;
        Top = 28, ;
        Left = 3, ;
        Height = 15, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape1"

    Add Object shape2 As Shape With ;
        Top = 23, ;
        Left = 9, ;
        Height = 20, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape2"

    Add Object shape3 As Shape With ;
        Top = 18, ;
        Left = 16, ;
        Height = 25, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape3"

    Add Object shape4 As Shape With ;
        Top = 13, ;
        Left = 23, ;
        Height = 30, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape4"

    Add Object shape5 As Shape With ;
        Top = 9, ;
        Left = 30, ;
        Height = 35, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape5"

    Add Object shape6 As Shape With ;
        Top = 4, ;
        Left = 37, ;
        Height = 40, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape6"

    Add Object shape7 As Shape With ;
        Top = 0, ;
        Left = 44, ;
        Height = 40, ;
        Width = 5, ;
        Curvature = 8, ;
        BackColor = Rgb(0,0,255), ;
        Name = "Shape7"

    Procedure Init
        This.SetAll("mousepointer",15,"shape")
    Endproc


Enddefine
*
*-- EndDefine: yvol

*ycont1
Define Class ycont1 As Container
    Top = 508
    Left = 48
    Width = 336
    Height = 18
    BackStyle = 0
    BorderWidth = 0
    Name = "ycont1"

    Add Object label2 As Label With ;
        Caption = "", ;
        Height = 5, ;
        Left = 0, ;
        Top = 7, ;
        Width = 336, ;
        BackColor = Rgb(192,192,192), ;
        Name = "Label2"

    Add Object label1 As Label With ;
        Caption = "", ;
        Height = 6, ;
        Left = 0, ;
        Top = 7, ;
        Width = 0, ;
        BackColor = Rgb(255,0,0), ;
        Name = "Label1"

    Add Object shape1 As Shape With ;
        Top = 3, ;
        Left = -8, ;
        Height = 15, ;
        Width = 15, ;
        Curvature = 99, ;
        MousePointer = 15, ;
        BackColor = Rgb(255,0,0), ;
        Name = "Shape1"

    Procedure Init
        With This
            .label1.Left=0
            .label1.Width=0
            .shape1.Left=-This.shape1.Width
        Endwith
    Endproc

    Procedure shape1.MouseEnter
        Lparameters nButton, nShift, nXCoord, nYCoord
        Try
            This.ToolTipText=Thisform.wmp.Controls.currentpositionString
        Catch
        Endtry
    Endproc

Enddefine
*
*-- EndDefine: ycont1
 

*CONTAINER2
Define Class container2 As Container
    Top = 564
    Left = 201
    Width = 350
    Height = 28
    BackStyle = 0
    ToolTipText="container2"
    Name = "Container2"

    Add Object command1 As CommandButton With ;
        Top = 2, ;
        Left = 1, ;
        Height = 25, ;
        Width = 25, ;
        Caption = "...", ;
        Name = "Command1"

    Add Object command2 As CommandButton With ;
        Top = 2, ;
        Left = 28, ;
        Height = 25, ;
        Width = 25, ;
        FontBold = .T., ;
        fontname="webdings",;
        Caption = "4", ;
        Name = "Command2"

    Add Object command3 As CommandButton With ;
        Top = 2, ;
        Left = 55, ;
        Height = 25, ;
        Width = 41, ;
        Caption = "Stop", ;
        Name = "Command3"

    Add Object command4 As CommandButton With ;
        Top = 2, ;
        Left = 98, ;
        Height = 25, ;
        Width = 65, ;
        Caption = "Fullscreen", ;
        Name = "Command4"

    Add Object command5 As CommandButton With ;
        Top = 2, ;
        Left = 162, ;
        Height = 25, ;
        Width = 35, ;
        Caption = "Mute", ;
        Name = "Command5"

    Add Object command6 As CommandButton With ;
        Top = 2, ;
        Left = 198, ;
        Height = 25, ;
        Width = 22, ;
        Caption = "?", ;
        fontsize=16,;
        forecolor=255,;
        fontbold=.T.,;
        Name = "Command6"

    Procedure Init
        This.SetAll("backcolor",Rgb(0,255,0),"commandbutton")
        This.SetAll("mousepointer",15,"commandbutton")
        This.SetAll("backcolor",Rgb(0,255,0),"commandbutton")
    Endproc

    Procedure command1.Click
        With Thisform.wmp

            .url=Getfile("wmv|mpg|mpeg|avi|mp4|flv|wav|mp3")
            If !Lower(Justext(.url)) $  "wmvmpgmpegavimp4flvwavmp3"
                .url=""
                Return .F.
            Endi
        Endwith
        Thisform.ycont1.Init()
        Thisform.timer1.Enabled=.T.
        This.Parent.command2.Caption="4"
        Thisform.container1.ylab.Caption=""
    Endproc

    Procedure command2.Click
        If ! Empty(Thisform.wmp.url)
            Do Case
                Case This.Caption="4"
                    Thisform.wmp.Controls.Play
                    Thisform.timer1.Enabled=.T.
                    This.Caption=";"


                Case This.Caption=";"
                    Thisform.wmp.Controls.Pause
                    Thisform.timer1.Enabled=.F.
                    This.Caption="4"
            Endcase
            Thisform.wmp.Resize()
        Endi
    Endproc

    Procedure command3.Click
        With Thisform
            .wmp.Controls.stop
            .container2.command2.Caption="4"
            .timer1.Enabled=.F.
            .ycont1.Init()
            .wmp.Resize()
        Endwith
    Endproc

    Procedure command4.Click
        Try
            Thisform.wmp.fullscreen=.T.
        Catch
        Endtry
    Endproc

    Procedure command5.Click
        Thisform.wmp.settings.mute=!Thisform.wmp.settings.mute
    Endproc

    Procedure command6.Click

        Local m.myvar
        TEXT to m.myvar noshow
this is a custom windows mediaplayer embed as olecontrol on a vfp form.
Its always difficult to maintain the position and the size ration for WMP.
On a form i made the uimode="none" : it worked and not shows the menubar.On a
prg that dont work (as you can test).
i made some custom controls as (trackbar,sound,...)
It allows to vfp developper o see how to play with this olecontrol.
Its an universal tool and can work on disc and on the web, for all medias.
        ENDTEXT
        Messagebox(m.myvar,0+32+4096,"Summary help")

    Endproc


Enddefine
*
*-- EndDefine: container2


*End code

_________________
§Q¥Î>>·j´M<<ªº¥\¯à·|¤ñ°ÝªºÁÙ­n§Ö±o¨ìµª®×.
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ µo°e¹q¤l¶l¥ó
garfield
Site Admin


µù¥U®É¶¡: 2003-01-30
¤å³¹: 2157


²Ä 2 ¼Ó

µoªíµoªí©ó: ¬P´Á¤T ¤T¤ë 23, 2016 4:50 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

¸É¥R´X­Ó·|¥Î¨ìªº¥\¯à
¥N½X:

yform.wmp.settings.autoStart = .t.

yform.wmp.currentPlaylist.clear()
DIMENSION mplaylist[3]
mplaylist[1]='d:\dvd\movie1.mkv'
mplaylist[2]='d:\dvd\movie2.mkv'
mplaylist[3]='d:\dvd\movie3.mkv'
FOR i=1 TO ALEN(mplaylist)
   IF FILE(mplaylist[i])
      yform.wmp.currentplaylist.appendItem(yform.wmp.newMedia(playlist[i]))
   endif
next
DO WHILE yform.wmp.currentmedia.duration >0
   INKEY(0.1)
   IF LASTKEY()=27
      exit
   endif
ENDDO
*¥Îplaylist µLªk autoplay
yform.wmp.Controls.play
INKEY(1)
yform.wmp.fullscreen=.T.
*yform.wmp.Controls.STOP
*yform.wmp.settings.mute=.T.
yform.wmp.settings.volume=100      &&--0¨ì100
*yform.wmp.controls.currentPosition = yform.wmp.currentmedia.duration/2      &&--¨ì¼v¤ù¤@¥b�}©l¼½©ñ
*? '¤w¼½©ñ¬í¼Æ/Á`¬í¼Æ:',yform.wmp.controls.currentPosition ,' / ',yform.wmp.currentmedia.duration
*? '¼v¤ùªø«×®É:¤À:¬í :',yform.wmp.currentmedia.durationString

_________________
§Q¥Î>>·j´M<<ªº¥\¯à·|¤ñ°ÝªºÁÙ­n§Ö±o¨ìµª®×.
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ µo°e¹q¤l¶l¥ó
ezpos



µù¥U®É¶¡: 2011-04-20
¤å³¹: 323


²Ä 3 ¼Ó

µoªíµoªí©ó: ¬P´Á¤­ ¤»¤ë 03, 2016 9:07 am    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

§Ú·Ó¼Ó¥Dªºµ{¦¡½X­×§ï¦¨¥H¤U
¼·©ñ¾¹§Ú³]©w¬° 360*312
¼½©ñ¼v¤ùªº®É­Ô.³ºµM·|Åܤj
¥Ø«eÁÙ¨S§ä¨ì§ïµ½ªº¤èªk!!



¥N½X:



thisform.wmp.settings.autoStart = .T.
thisform.wmp.UiMode="mini"
thisform.wmp.enableContextMenu=.F.
thisform.wmp.Height =312
thisform.wmp.Width = 360
thisform.wmp.Stretchtofit=.F.
thisform.wmp.currentPlaylist.Clear()


Dimension mplaylist[3]
mplaylist[1]='D:\download\ci\01.wmv'
mplaylist[2]=''
mplaylist[3]=''

For i=1 To Alen(mplaylist)

   If File(mplaylist[i])
      thisform.wmp.currentPlaylist.appendItem(thisform.wmp.newMedia(mplaylist[i]))
   Endif

NEXT

Do While thisform.wmp.currentmedia.duration >0
   Inkey(0.1)
   If Lastkey()=27
      Exit
   Endif
Enddo
*¥Îplaylist µLªk autoplay
thisform.wmp.Controls.Play
thisform.wmp.Height =312
thisform.wmp.Width = 360
Inkey(1)
thisform.wmp.fullscreen=.F.
*yform.wmp.Controls.STOP
*yform.wmp.settings.mute=.T.
thisform.wmp.settings.Volume=100      &&--0¨ì100







¤Þ¨¥¦^ÂÐ:
属©Ê/¤èªk¦W¡G 说©ú¡G
[°ò¥»属©Ê]
URL:String; «ü©w´CÊ^¦ì¸m¡A¥»Éó©ÎÊI络¦a§}
uiMode:String; ¼½©ñ¾¹¬É­±¼Ò¦¡¡A¥i为Full, Mini, None, Invisible
playState:integer; ¼½©ñ状态¡A1=°±¤î¡A2=暂°±¡A3=¼½©ñ¡A6=¥¿¦b缓ú}¡A9=¥¿¦b连±µ¡A10=­ã备´N绪
enableContextMenu:Boolean; ûD¥Î/¸T¥Î¥k键µæ单
fullScreen:boolean; ¬O§_¥þ«Ì显¥Ü
[controls] wmp.controls //¼½©ñ¾¹°ò¥»±±¨î
controls.play; ¼½©ñ
controls.pause; 暂°±
controls.stop; °±¤î
controls.currentPosition:double; 当«e进«×
controls.currentPositionString:string; 当«e进«×¡A¦r²Å¦ê®æ¦¡¡C¦p¡§00:23¡¨
controls.fastForward; §Ö进
controls.fastReverse; §Ö°h
controls.next; ¤U¤@¦±
controls.previous; ¤W¤@¦±
[settings] wmp.settings //¼½©ñ¾¹°ò¥»设¸m
settings.volume:integer; ­µ¶q¡A0-100
settings.autoStart:Boolean; ¬O§_¦Û动¼½©ñ
settings.mute:Boolean; ¬O§_静­µ
settings.playCount:integer; ¼½©ñ¦¸数
[currentMedia] wmp.currentMedia //当«e´CÊ^属©Ê
currentMedia.duration:double; ´CÊ^总长«×
currentMedia.durationString:string; ´CÊ^总长«×¡A¦r²Å¦ê®æ¦¡¡C¦p¡§03:24¡¨
currentMedia.getItemInfo(const string); 获¨ú当«e´CÊ^«H®§"Title"=´CÊ^标题¡A"Author"=艺术®a¡A"Copyright"=ª©权«H®§¡A"Description"=´CÊ^内®e´y­z¡A "Duration"=«ù续时间¡]¬í¡^¡A"FileSize"=¤å¥ó¤j¤p¡A"FileType"=¤å¥ó类«¬¡A"sourceURL"=­ì©l¦a§}
currentMedia.setItemInfo(const string); ³q过属©Ê¦W设¸m´CÊ^«H®§
currentMedia.name:string; ¦P currentMedia.getItemInfo("Title")
[currentPlaylist] wmp.currentPlaylist //当«e¼½©ñ¦Cªí属©Ê
currentPlaylist.count:integer; 当«e¼½©ñ¦Cªí©Ò¥]§t´CÊ^数
currentPlaylist.Item[integer]; 获¨ú©Î设¸m«ü©w项¥Ø´CÊ^«H®§¡A¨ä¤l属©Ê¦Pwmp.currentMedia

playState:integer; ¼½©ñ状态¡C这个属©Ê§ï变时¦P时¤Þ发PlayStateChange¨Æ¥óÉOStateChange¨Æ¥ó¡C¨ú­È­S围为ªT举«¬¡GWMPLib.WMPPlayState¡A¥¦ªº¦¨员¦p¤U¡G
wmppsUndefined = 0; //¥¼ª¾状态
wmppsStopped = 1; //¼½©ñ°±¤î
wmppsPaused = 2; //¼½©ñ暂°±
wmppsPlaying = 3; //¥¿¦b¼½©ñ
wmppsScanForward = 4; //¦V«e·j¯Á
wmppsScanReverse = 5; //¦V¦Z·j¯Á
wmppsBuffering = 6; //¥¿¦b缓ú}
wmppsWaiting = 7; //¥¿¦bµ¥«Ý¬y开©l
wmppsMediaEnded = 8; //¼½©ñ¬y¤w结§ô
wmppsTransitioning = 9; //­ã备·sªº´CÊ^¤å¥ó
wmppsReady = 10; //¼½©ñ­ã备´N绪
wmppsReconnecting = 11; //尝试­«·s连±µ¬y´CÊ^数Õu
wmppsLast = 12; //¤W¤@¦¸状态,状态没¦³§ï变

_________________
ezPos¦¬»È¾÷ ²³æ¦n¥Î§C¦¨¥» http://www.ezpos.info
¥þ·s¬üÆ[ªºPOS¦¬»È¾÷.POS³nµwÅé¯Ó§÷.
³nÅé«È¨î¤Æ.ºô¯¸³W¹º....¯àÁÈ¿úªº³£¥i¥H§ä§Ú

http://www.twelife.com ¥xÆW¥Í¬¡ºô
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ °ÑÆ[µoªí¤Hªº­Ó¤Hºô¯¸
kalok



µù¥U®É¶¡: 2010-08-26
¤å³¹: 284


²Ä 4 ¼Ó

µoªíµoªí©ó: ¬P´Á¤T ¤Q¤@¤ë 16, 2016 9:12 am    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

¬Ý¨Ó¤£¿ù
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§
ezpos



µù¥U®É¶¡: 2011-04-20
¤å³¹: 323


²Ä 5 ¼Ó

µoªíµoªí©ó: ¬P´Á¥| ¤»¤ë 21, 2018 11:23 am    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

½Ð±Ð¤@¤U
WMPlayer.OCX ­Y¬O¨S¦³¦w¸Ë!!
­n¨ì­þÃä¤U¸ü¦w¸Ë

_________________
ezPos¦¬»È¾÷ ²³æ¦n¥Î§C¦¨¥» http://www.ezpos.info
¥þ·s¬üÆ[ªºPOS¦¬»È¾÷.POS³nµwÅé¯Ó§÷.
³nÅé«È¨î¤Æ.ºô¯¸³W¹º....¯àÁÈ¿úªº³£¥i¥H§ä§Ú

http://www.twelife.com ¥xÆW¥Í¬¡ºô
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ °ÑÆ[µoªí¤Hªº­Ó¤Hºô¯¸
garfield
Site Admin


µù¥U®É¶¡: 2003-01-30
¤å³¹: 2157


²Ä 6 ¼Ó

µoªíµoªí©ó: ¬P´Á¥| ¤»¤ë 21, 2018 10:06 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

¸ÕµÛ¤U¸ü Windows Media Player SDK
https://www.microsoft.com/en-us/download/details.aspx?id=25243

_________________
§Q¥Î>>·j´M<<ªº¥\¯à·|¤ñ°ÝªºÁÙ­n§Ö±o¨ìµª®×.
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ µo°e¹q¤l¶l¥ó
ezpos



µù¥U®É¶¡: 2011-04-20
¤å³¹: 323


²Ä 7 ¼Ó

µoªíµoªí©ó: ¬P´Á¤é ¤C¤ë 08, 2018 12:48 pm    ¤å³¹¥DÃD: ¤Þ¨¥¦^ÂÐ

ÁÂÁÂg¤j
_________________
ezPos¦¬»È¾÷ ²³æ¦n¥Î§C¦¨¥» http://www.ezpos.info
¥þ·s¬üÆ[ªºPOS¦¬»È¾÷.POS³nµwÅé¯Ó§÷.
³nÅé«È¨î¤Æ.ºô¯¸³W¹º....¯àÁÈ¿úªº³£¥i¥H§ä§Ú

http://www.twelife.com ¥xÆW¥Í¬¡ºô
¦^³»ºÝ
À˵ø·|­û­Ó¤H¸ê®Æ µo°e¨p¤H°T®§ °ÑÆ[µoªí¤Hªº­Ó¤Hºô¯¸
±q¤§«eªº¤å³¹¶}©lÅã¥Ü:   
µoªí·s¥DÃD   ¦^ÂÐ¥DÃD    VFP ·R¥ÎªÌªÀ°Ï ­º­¶ -> VFP °Q½×°Ï ©Ò¦³ªº®É¶¡§¡¬° ¥x¥_®É¶¡ (GMT + 8 ¤p®É)
²Ä1­¶(¦@1­¶)

 
«e©¹:  
±z µLªk ¦b³o­Óª©­±µoªí¤å³¹
±z µLªk ¦b³o­Óª©­±¦^ÂФ峹
±z µLªk ¦b³o­Óª©­±½s¿è¤å³¹
±z µLªk ¦b³o­Óª©­±§R°£¤å³¹
±z µLªk ¦b³o­Óª©­±¶i¦æ§ë²¼
±z µLªk ¦b³o­Óª©­±ªþ¥[ÀÉ®×
±z µLªk ¦b³o­Óª©­±¤U¸üÀÉ®×


Powered by phpBB © 2001, 2005 phpBB Group
¥¿Å餤¤å»y¨t¥Ñ phpbb-tw ºûÅ@»s§@