locked
C# Picture Box - Videos RRS feed

  • Question

  • Hello I want to make a media player with picture box....in fact I want to make the picture box show next frame repeatdly and paly the voice in the background...

    George Andredakis

    The limits of what a computer can do are difined only from programmer's imagination

    • Moved by CoolDadTx Wednesday, August 30, 2017 2:09 PM Winforms related
    Tuesday, August 29, 2017 6:27 PM

Answers

  • A picturebox isn't the appropriate solution here. Picturebox works by displaying a single image. That image has to be cleaned up and the PB will do that automatically. Trying to swap out images at the speed needed to "render" a video isn't going to work out well and it'll thrash memory.

    You should consider hosting one of the video controls that are available (commercially or freeware). The vast majority of them likely have samples on how to host them directly in Winforms by drag and drop. For the few that don't then it is a pretty simple matter to render an ActiveX in winforms. 

    Michael Taylor
    http://www.michaeltaylorp3.net

    Wednesday, August 30, 2017 2:09 PM

All replies

  • Hi Ghex_AJ,

    Could you please show us the code what you have done so far? We do not do all your work, we can guide you how to approach.


    Thanks,
    Sabah Shariq

    [If a post helps to resolve your issue, please click the "Mark as Answer" of that post or click Answered "Vote as helpful" button of that post. By marking a post as Answered or Helpful, you help others find the answer faster. ]

    Tuesday, August 29, 2017 9:19 PM
  • A picturebox isn't the appropriate solution here. Picturebox works by displaying a single image. That image has to be cleaned up and the PB will do that automatically. Trying to swap out images at the speed needed to "render" a video isn't going to work out well and it'll thrash memory.

    You should consider hosting one of the video controls that are available (commercially or freeware). The vast majority of them likely have samples on how to host them directly in Winforms by drag and drop. For the few that don't then it is a pretty simple matter to render an ActiveX in winforms. 

    Michael Taylor
    http://www.michaeltaylorp3.net

    Wednesday, August 30, 2017 2:09 PM
  • You could maybe host media player as a com component and use that to play video if that's you intention.

    https://msdn.microsoft.com/en-gb/library/bb383953(v=vs.90).aspx


    Hope that helps.

    Technet articles: WPF: Layout Lab; All my Technet Articles

    Wednesday, August 30, 2017 3:42 PM