Author Topic: AudioVideoPlayback played not my wmv-file  (Read 1626 times)

0 Members and 1 Guest are viewing this topic.

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
AudioVideoPlayback played not my wmv-file
« on: March 19, 2013, 04:21:28 AM »
Iīm trying to play a wmv-file, it comes a message that I donīt understand.
Code: [Select]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Microsoft.DirectX.AudioVideoPlayback;

namespace video
{
    public partial class Form1 : Form
    {
        Video myVid = new Video("h:\\2013\\Cadplayer toolboX_WMV_03-16-13.wmv");

        public Form1()
        {
            InitializeComponent();
            myVid.Owner = panel1;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            myVid.Play();
        }
    }
}

Regards Dirk

Jeff H

  • Needs a day job
  • Posts: 6150
Re: AudioVideoPlayback played not my wmv-file
« Reply #1 on: March 19, 2013, 06:50:32 AM »

Easier to load up project, and look at settings


Just change file name in form.


Notice appconfig
Code: [Select]
<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>
and to go to Debug Menu->Exceptions->Managed Debugging Assistants->LoaderLock---->Uncheck

cadplayer

  • Bull Frog
  • Posts: 390
  • Autocad Civil3d, OpenDCL.Runtime, LISP, .NET (C#)
Re: AudioVideoPlayback played not my wmv-file
« Reply #2 on: March 19, 2013, 07:43:24 AM »
Great!

Is it possible to include VideoPlayback in Autocad, for example to startup Autocad and than play the video ?