C# DirectX Video Size RRS feed

  • Question

  • Hi!


    I'm trying to set the size of a Video object in a Groupbox to the size i have on the GroupBox. But I'm having problems with it resizing to the default size of the WMV file im trying this operation on.

    Code Snippet

    if (openFileDialog1.ShowDialog() == DialogResult.OK)




        myVideo = new Video(openFileDialog1.FileName);

        myVideo.Owner = groupBox1;

        myVideo.Size = groupBox1.Size;

        MessageBox.Show(String.Format("{0:0}", myVideo.Duration));


      catch (Exception ex)







    This sets the size to the default size of the video file instead of the size of the groupBox. I don't see any other way to set the size of the video file using this Video class from directX.


    Monday, May 7, 2007 7:39 AM