Microsoft Developer Network > Página Inicial dos Fóruns > Visual C# General > Create video player seek bar using DirectX.AudioVideoPlayback
Fazer uma PerguntaFazer uma Pergunta
 

RespondidoCreate video player seek bar using DirectX.AudioVideoPlayback

  • quarta-feira, 9 de janeiro de 2008 20:10Ronnin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Hi,

    I'm trying to create a video player using de Microsoft.Directx.AudioVideoPlayback namespace. I'd like to add a seek bar to this player but I can't find a way to do it Sad . Any idea?

    Thanks in advance

Respostas

  • quarta-feira, 9 de janeiro de 2008 23:42Juan Carlos Ruiz [BogotaDotNet.org]MVPMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

     

    as i remember DirectX.AudioVideoPlayback is for simple usage and maybe haven't  allthe capabilities you are searching.

     

    but try whit this:

     

    Code Block

    Microsoft.DirectX.AudioVideoPlayback.Video theVideo= new Microsoft.DirectX.AudioVideoPlayback.Video(fileName);

     

    //Use both:

    //This return a double value indicating the current video position

    theVideo.CurrentPosition

    //This return a double value indicating the video Duration

    theVideo.Duration

     

     

     

     

     

     

Todas as Respostas

  • quarta-feira, 9 de janeiro de 2008 23:42Juan Carlos Ruiz [BogotaDotNet.org]MVPMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

     

    as i remember DirectX.AudioVideoPlayback is for simple usage and maybe haven't  allthe capabilities you are searching.

     

    but try whit this:

     

    Code Block

    Microsoft.DirectX.AudioVideoPlayback.Video theVideo= new Microsoft.DirectX.AudioVideoPlayback.Video(fileName);

     

    //Use both:

    //This return a double value indicating the current video position

    theVideo.CurrentPosition

    //This return a double value indicating the video Duration

    theVideo.Duration

     

     

     

     

     

     

  • quinta-feira, 10 de janeiro de 2008 6:04Ronnin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    It seems as a I have to create my own seek bar using that two properties. I hope there were something already implemented because I don't want to expend so much time doing this and I am absolutely newbie creating custom controls and so on...

    Thanks for the response
  • quinta-feira, 10 de janeiro de 2008 7:04Juan Carlos Ruiz [BogotaDotNet.org]MVPMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Using forms designer add a TrackBar object to your application and combine this with the values previously i showed to you.

    Ensure the object container to your video isn't the entire windows form, use a panel or something like that.
  • quinta-feira, 10 de janeiro de 2008 7:31Ronnin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Ok, I'll try that this evening. Thanks again for your help
  • segunda-feira, 14 de janeiro de 2008 12:57Wen-Jun ZhangMSFT, ModeradorMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    Hi Ronnin,

     

    Has the problem been resolved yet?

     

    If you do not want to create your own control to implement the seeking, another workable approach is using the WMP ActiveX control in your .net application. Please refer to:

     

    Using the Windows Media Player Control in a .NET Framework Solution
     
    I hope the information helps. Thanks.
     
     
     
     
  • segunda-feira, 14 de janeiro de 2008 16:33Ronnin Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    I have used a TrackBar as suggested before and it solve my problem. Anyway I'll take a look to your suggestion.

    Thanks for answering