Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is the code to play a video file. How can i specify the c# code to play a video with particular frame no or a particular time like 1 minute.30 second or


C#
try
          {
              int width = panel1.Width;
              int height = panel1.Height;
            System.Uri u = new Uri("http://xyz.com/Testmovie.avi");                Video video;
            video = Video.FromUrl(u);

              video.Owner = panel1;
              video.Stop();
              video.Play();

              // resize the video to the size original size of the panel

              panel1.Size = new Size(width, height);
          }catch(Exception gh)
          {
              MessageBox.Show(gh.ToString());
          }
Posted
Comments
Sandeep Mewara 24-Feb-13 4:28am    
Which video object is this? video = Video.FromUrl(u);

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900